Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 1.66 KB

README.md

File metadata and controls

32 lines (28 loc) · 1.66 KB

ng-full-stack

ng-full-stack is todo and auth app built by Node, Express, Mongoose include Mocha, Chai for testing backend and include passport-jwt for authentication, for the frontend built by AngularCLI and PrimgNG feel free to use this repo and welcome for pull request

dependencies

node.js
mongodb

how to install

--- back end ---
clone this repo and run :
npm install
--- front end ---
goto angular directory and run :
npm install

how to run

--- back end ---
to start server and mongodb server type :
npm start
test nodejs and http request by mocha and chai type :
npm test (***cancel npm start and start mongodb first)
--- front end ---
goto angular directory and type :
ng serve

deploy step on heroku


1.in package.json at scripts start change "concurrently \"mongod\" \"nodemon\"" to "node app"
2.edit gitignore file, open comment under #in prod on heroku then comment on /public
3.go to app.js then change port from 3000 to 8080
4.go to angular foler and run: ng build
5.in angular folder edit src/app/class/config.ts, at api variable change 'http://localhost:3000/' to '' (empty string)
6.git init, git add ., git commit then run heroku create and git push heroku master
7.go to heroku console then add mongodb addon (mlab)
8.go to mlab console create new database then add collection and user for connect
9.change mongodb url in server/config/db.js
10.re commit your code to heroku again
11.finish now