Skip to content

dvcoders/dvcoders-apply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dvcoders-apply

js-standard-style

Our apply website and server (Node.js + MongoDB)

Requirements

For testing

Installation

Run from your terminal:

git clone [email protected]:dvcoders/dvcoders-apply.git
cd dvcoders-apply
npm install

Then you need to create a .env file for the environment variables for your Github API key, Github User-Agent header, and Slack token:

Example:

GITHUB_API_KEY=9f869b245f49641b12137cb202ccb82c3f870eb9
GITHUB_USER_AGENT=dvcoders
SLACK_TOKEN=xoxp-1495209272-1796258573-9288732744-1b9d2f09
SLACK_WEBHOOK_URI=https://hooks.slack.com/services/X0AB9CDE0/A0B12CD3E/a6Bcde3fGh45iJKlmnOp

Make sure you have MongoDB running. On OSX, you can run:

brew install mongodb
brew services start mongodb

Running

For development work

Use nodemon to restart the server automatically when changes are made.

npm install -g nodemon
nodemon app.js

For production deployment

Use pm2 to handle log management and server crashes.

npm install -g pm2
cat <<EOF > server.json
{
  "apps": [{
    "name": "dvcoders-apply",
    "script": "app.js",
    "watch": true
  }]
}
EOF
pm2 start server.json

Testing

Set up all the required env variables, install development dependencies, and run from your terminal:

npm test