Skip to content

Instantly share code, notes, and snippets.

View cckn1ght's full-sized avatar

Qunhao S. cckn1ght

View GitHub Profile
@cckn1ght
cckn1ght / server.js
Created December 23, 2017 16:19
backend login logic
// server will establish a link to mongodb when it starts.
console.log('mongodb url: ' + _config2.default.mongoURL);
_mongoose2.default.connect(_config2.default.mongoURL, _config2.mongo_options, function (error) {
if (error) {
console.error('Please make sure Mongodb is installed and running!');
}
});
@cckn1ght
cckn1ght / README.md
Created July 22, 2016 03:36 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/