Week-11 Challenge
This application was developed to provide users with a platform for organizing their thoughts and managing tasks through note storage. It utilizes Express and JavaScript, employing a json file (db.json) as a pseudo-database for data storage and retrieval. My responsibilities involved integrating the backend and frontend of the application using Express, enabling users to save, retrieve, post, and delete data through the frontend UI. To test the application's GET, POST, and DELETE routes, I utilized Insomnia, a valuable tool for backend development that eliminates the need for an index.html file and linked script.js file. While building the application, I gained insight into the capabilities of Express and its potential for large-scale database interactions with APIs. I encountered some errors related to race conditions and concurrency issues, which would be addressed in future development. This includes organizing the server.js file by creating a routes folder for improved file organization and considering the use of a proper database like MySQL for data management.
https://notes-ucberkeley.herokuapp.com/
https://drive.google.com/file/d/16mjh5Pk8DIZsmYwZ340xfOBqjaGSaVU9/view
This project is powered by Express.js and Node.js (v16.19.1), utilizing JavaScript as the programming language. It incorporates uniqid and file system modules as dependencies. To facilitate testing of GET, POST, and DELETE request routes, the application leverages Insomnia, eliminating the need for a dedicated front-end framework.
-
Clone the repo: git clone [email protected]:Slfdspln/logo-maker.git
-
Open in VS Code. If you do not have VS code you must install it.
-
Using the terminal, install node.js v16. If you have homebrew, the command should look like the following (brew install node@16), however this may vary and the documentation should be consulted.
-
Once node.js v16 is installed, in the terminal, utilize the command npm init -y to initialize and create a package.json where project files will be stored.
-
Next, use the terminal to run the command npm i to install the dependencies associated with this application (developers may need to install express and uniqid directly from the command line, to do so the command for express will be npm i express to install the latests version of Express framework globally so that it can be used within the node terminal, and npm i uniqid to install the latest version of uniqid).
-
To run the server, within the terminal, type the command npm start or node server.js.
-
Once the server is running, users can then access the front end of the application within the browser to observe full functionality of the site.
This application requires a server running in the background, which is powered by Express. To start the server, follow these steps:
-
Navigate to the application's directory.
-
Install all dependencies by running the command "npm i".
-
Start the server by typing "npm start" or "node index.js".
-
The command line will display a message: "App listening at http://localhost:3001 🚀".
-
Once the server is running, access the application's front end directly from the command line by holding the command key and clicking on the link http://localhost:3001.
-
Users can then view existing notes from the database or create new notes.
-
Any newly created notes will be saved to the database and persisted.
NOTICE: This application is covered under the MIT License
Need more information? You can contact me through my LinkedIn or Email. Links provided below.
Click for LinkedIn -> LinkedIn
Click to Email -> Email