Generate a safety case diagram.
- Install Node.js for your machine (LTS or Current is fine)
- Create a file named
- Contains values that should never be committed to the repository
- Refer to
example.envas an example. Replace all variables as needed.
- In the terminal
npm installto download project dependencies
npm startin one terminal for the server-side portion
npm run devin the another to serve the frontend portion
npm run build- Compiles the frontend code
npm run dev- Runs the frontend code in development mode. Autoreloads the browser upon file changes.
npm run lint- Lints the files for consistent code styles
npm run lint:fix- Fixes most lint errors
npm run lint:type- Type checks the code using
npm start- Runs the server-side portion. Uses port
npm test- Runs the linter, typechecker, then the test suite
- Description: Feature Branch Workflow
- Essentially, create a new branch for every feature/change being implemented.
- Each change should have an opened pull request.
- Each pull request should be reviewed (if available).
- mLab - MongoDB hosting service
- Heroku - Server hosting service
- Netlify - Static-site hosting service
For the instructions below, I'm assuming that you have made an account on these sites.
- Create New MongoDB Deployment
- Follow the instructions. Choose whatever provider/price is appropriate. (Free tier available)
- View the created database
- In the Collections tab, create 3
- In the Users tab, create a database user
- This gives read/write access to the database
- Remember the username and password, it's used in the standard MongoDB URI
- It is the
- It is the
- Note: Install the Heroku CLI (https://devcenter.heroku.com/articles/heroku-cli)
- On the dashboard, create a new app
- In the settings tab of the app
- Click: Reveal Config Vars
- Set the
- In the deploy tab of the app
- Follow the instructions for using the CLI
- Push the application using
git push heroku master
- It should then run automatically
- In the
wepback.prod.jsfile, change the server URL to the new Heroku app's URL
- Build the application bundle:
npm run build
- Under the sites page, drag-and-drop the
distdirectory that was built onto the site
- The site should then be live
- Updates can be uploaded to the same site under the Deploys tab
- In the