This application is for writing, saving, and deleting notes. It uses an Express.js backend and saves and retrieves note data from a JSON file.
Repo Link
NOTE: Since this application cannot be deployed on GitHub, the deployed app can be found on Heroku. Please see the Demo section below for an overview of its functionality and the Getting Started section for more information regarding installation, usage, contribution guidelines, tests and where to go for questions.
- About The Project
- Project Links
- Demo
- Getting Started
- Installation
- Usage
- Tests
- Contribution Guidelines
- Questions
- Project Status
- License
This project scope was to create an application that can be used to write, save, and delete notes. This application uses an Express.js
backend and saves and retrieves note data from a JSON file.
-
The application frontend has already been created, this project was to build the backend and connect the two.
-
The following HTML routes were created:
-
GET
/notes
- Returns thenotes.html
file. -
GET
*
- Returns theindex.html
file
-
-
The application has a
db.json
file on the backend that is used to store and retrieve notes using thefs
module. -
The following API routes were created:
-
GET
/api/notes
- Reads thedb.json
file and returns all saved notes as JSON. -
POST
/api/notes
- Receives a new note to save on the request body, adds it to thedb.json
file, and then returns the new note to the client. -
DELETE
/api/notes/:id
- Receives a query parameter containing the id of a note to delete. Each note is given a uniqueid
when it's saved usinguniqid npm
. In order to delete a note, all notes from thedb.json
file are read, and the note with the deletedid
property is removed from thedb.json
file. Finally, the notes are rewritten to thedb.json
file.
-
The dependencies are Express.js, for robust routing (it is a fast, unopinionated, minimalist framework for node) and uniqid for very fast generation of unique ids on multiple processes and machines even if called at the same time.
Because this application cannot be deployed on GitHub, a walkthrough video demonstrates its functionality below. The deployed app can be found on Heroku.
AS A user, I want to be able to write and save notes
I WANT to be able to delete notes I've written before
SO THAT I can organize my thoughts and keep track of tasks I need to complete
For users that need to keep track of a lot of information, it's easy to forget or be unable to recall something important. Being able to take persistent notes allows users to have written information available when needed.
Application should allow users to create and save notes.
Application should allow users to view previously saved notes.
Application should allow users to delete previously saved notes.
The following is a brief overview of the note taker application in operation. See full video demonstration on "See how it works!" link above:
- JavaScript
- Node.js
- Uniqid npm
- Express.js
git clone - https://github.com/onomatopoetica/note-taker.git
The application is for writing, saving, and deleting notes. It uses an Express.js backend and saves and retrieves note data from a JSON file.
See demo video above for more information on how it works.
Enter command 'npm install express uniqid' after cloning the repo to install Express.js and uniqid npm. The application will be invoked by using nodemon
or entering the following in the command line: 'node server.js'. You will see 'App listening on PORT 3000' in the console. You can then view the app on http://localhost:3000/.
When contributing to this repository, please first discuss the change you wish to make via issue or email with the project team. See contact details below.