Complete the following steps to implement the project:
- Clone this repository to local:
git clone https://github.com/thinkful-ei-gecko/smiti-noteful-server.git
cd
into the cloned repository- Make a fresh start of the git history for this project with
rm -rf .git && git init
- Install the node dependencies
npm i
- Move the example Environment file
example.env
to.env
, which will be ignored by git and read by the express servermv example.env .env
. Adjust those environment variables as needed. - Run
npm run migrate
to set up the db
Start the server: npm start
Start the server with nodemon (recommended): npm run dev
Run migration scripts: npm run migration
(dev) or npm run migration-prod
(prod)
Run tests: npm test
Run debugger: npm debug
When the new project is ready for deployment, add a new Heroku app with heroku create
. This will make a new git remote called "heroku". Then npm run deploy
, which will push to this remote's master branch after auditing your packages (a predeploy script).
To deploy the database to production:
heroku create
heroku addons:create heroku-postgresql:hobby-dev
heroku pg:credentials:url
(copy configs to .env to satisfy thepostgrator-prod-config.js
requirements)npm run migrate-prod
npm run deploy
npm run migrate-prod