Stop being dumb and start being smart.
Make sure that Node, Mongo, and Redis are installed on your machine. If not, install these with .
brew install node
brew install mongodb
brew services start mongodb
brew install redis
brew services start redis
redis-cli ping
Create a file called .env
in the root directory. This is just for local development – in production you'll set these as environment variables on your server.
SECRET=secret-string-for-tokens-and-encryption
EXAMPLE_CLIENT_ID=123456ab-cdef-ghij-klmn-opqrstuvwxyz
EXAMPLE_CLIENT_SECRET=123456ab-cdef-ghij-klmn-opqrstuvwxyz
BASE_URL=
MONGODB_URI=
REDIS_URL=
# Install dependencies
npm install
# Development
npm run dev
# Production
npm start
- Write clean, but not clever code
- Write comments for a level II dev
- Avoid premature optimization
Keep the status codes simple - try to stick to these.
200
– OK201
– Created204
– No Content304
– Not Modified400
– Bad Request401
– Unauthorized403
– Forbidden404
– Not Found410
– Gone500
– Internal Server Error