SaraJo / noteful-app

Demo solution for Node/Express course

Home Page:https://notefulapp.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Noteful: A note taking app

This app is meant to give students experience with building REST APIs with Node, Express, JWT-based auth, Mongo, and Mongoose.

It is also provided as a backend that curriculum contributors, instructors, and students can run locally to build clients that provide a GUI for this API.

Full API spec available here

Seed db and run server

  1. Clone the repo.
  2. cd into it.
  3. npm install
  4. Make sure you have Mongo installed and running locally.
  5. Rename the .env.example file to .env. This file sets up any config vars that you'll need to run this app locally.
  6. Run node util/seed-database.js
  7. The seed process inserts three users: user0, user1, and user2 with the password password.
  8. Run npm start to start the dev server.
  9. To access a protected endpoint
    1. POST the username + password to /api/login
    2. Copy the authToken value
    3. Add token Authorization header as a Bearer Token

If you need to zero out the database, you can run node util/drop-database.js

About

Demo solution for Node/Express course

https://notefulapp.herokuapp.com/


Languages

Language:JavaScript 90.0%Language:HTML 5.3%Language:CSS 4.8%