Developed by ca2los
HEROKU SERVER: TRY IT HERE VERSION 1.0
In this project you have the option of read, create and delete notes in the browser. It's based on 3 HTTP methods: GET, POST, and READ. These three concepts allows the user to create notes by adding a usearname and the note description, save notes, store them as JSON format, and delete data. On browser's refresh, the data persistance will not delete the saved notes.
To run NoteGen, you must make sure Node JS and NPM are already installed in your computer.
To check if Node JS is already installed, from your Terminal Console
enter the
command node -v
and press the ENTER key. It will show you a message with the
version of Node only if the package was installed before. If the message is different,
click the link and download the recommended version of the
package and install it.
To check if NPM is already installed, from your Terminal Console
enter the
command npm -v
and press the ENTER key. It will show you a message with the
version of Node only if the package was installed before. If the message is different,
then enter the command npm install
and press the ENTER key.
From your terminal console, go through your files and locate the folder you want
to work with. Now enter the command npm init -y
and press the ENTER key. Now
do the same with the command npm i inquirer --save
and press the ENTER key.
Once the packages are installed, from your terminal console and in the same folder
run the command node index.js
and press ENTER. Finally, when the program starts you
will need to access the requested data and press ENTER every time you finish.
// Command to initialize the program
$ node server.js
// The PORT is activated and ready to use
? App listening at http://localhost:3001 🚀
- The
npm init -y
creates a new JSON file loading the main settings of NPM libraries.
KEY | VALUE |
---|---|
node server.js |
App listening to you local |
GET request to |
Access to available files and paths |
POST request to |
Publish data |
DELETE request to |
Eliminate data when the ID key is accessed |
URL for JSON data: NOTES
URL for JSON data: VALIDATION
EXPRESS LINK Express library to develop instructions for HTTP methods.
FS LIBRARY LINK Helpful to read, write and append a file from the Terminal.
PATH LIBRARY LINK Helpful to create and link file paths.
Let me know if you are interested in upgrading the base code of the program. Contact me via GitHub, and commit your changes by following the instructions:
Before pushing your changes, you must share a screenshot of the test generated by JEST. To begin with this process:
- You must run at you terminal the command
npm install --save-dev jest
. - When the installation has finished, take a look at your
package.json
file and make sure the instruction"test": "jest"
is insidescripts
. If not, copy the code and paste it. - Now run the command ´npm run test´ and if the program shows you no errors, take a screenshot and add it in your push to make sure the code is OK.
The code is still upgrading. The DELETE HTTP request is on development and further updates on selected data will be shared.