Skip to content

Commit

Permalink
edit readme.md
Browse files Browse the repository at this point in the history
Added local env setup instruction
  • Loading branch information
Tingcheng Cui committed Mar 19, 2017
1 parent 100b08c commit ee182c2
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,44 @@ For example: `fix/type` or `feature/issue-templates`
## Code Style
Code style is not strictly enforced, but please follow [Airbnb's style guide](https://github.com/airbnb/javascript) if you can.

## Start the node.js server
## Setup local development environment
**Install Nginx.**

sudo apt-get install nginx

If you have apache installed, remove apache or edit `/etc/apache2/ports.conf`
change `Listen 80` to `Listen [any usable port other than 80 and 8080]`
restart apache and nginx

service apache2 restart
service nginx restart

**Install npm and node.js**

sudo apt-get install npm
sudo apt-get install nodejs

Try command `node -v` after installation. It is very likely you will see this error message `/usr/sbin/node: No such file or directory`, fix it by symbolic link `nodejs` to `node` in `/usr/bin`.

sudo ln -s /usr/bin/nodejs /usr/bin/node

**Install dependencies**

cd [project directory]
npm install

**Nginx config**


Server config file can be found in project root directory.

To enable the site, symbolic link test.uwacg to /etc/nginx/sites-enabled

sudo ln -s /etc/nginx/sites-available/test.uwacg /etc/nginx/sites-enabled

NOTE: You must use absolute path to create the link

## Start the node.js server (TODO: change to PM2 method)
Have node.js and npm installed in your environment.

npm install
Expand Down

0 comments on commit ee182c2

Please sign in to comment.