Application v1.2
Installation
Tested with the following
Node 8.11.3-LTS
npm 6.2.0
Installing this project is simple, run the following commands:
$ sudo npm i npm@latest -g
$ sudo npm install
# Might need sudo npm install --unsafe-perm
# DEVELOPMENT
$ sudo mongod & # start mongodb locally
$ npm run-script dev
# PRODUCTION
$ npm start
Remember
-
Ensure inboud rules are open for HTTP and HTTPS
-
Change iptables on server so port 80 and 443 are forwarded to 3000 and 4000 respectively
$ sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000
$ sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 4000
Open : http://localhost:3000/
NOTE: You must have MongoDB installed and working locally in order to run this project.
ROUTES
localhost:3000/email/verify?email=some@email.com (starts the user verification process)
localhost:3000/[OBJECT]/[ACTION] localhost:3000/person/create
localhost:3000/[OBJECT]/[IDENTIFIER]/[ACTION] localhost:3000/person/23asdfa2423/update
Fork Yourself
- Create new repository (no README, no gitignore)
- Clone locally (git clone xxx)
- In newly cloned repo: git remote add template https://github.com/JoseBarrios/app-node-template.git
- git pull template master (you might need to add the --allow-unrelated-histories option)
- git commit -a -m "merged"
- git push origin master
TODO
- Slack integration
- Classes: Experiment
Questions
Got questions? Hit me up! I'm jose@barrios.io