Photo Album is an app where people can see thier albums and its associated photos.
It allows a user to see their albums and its' associated photographs
-
The app is a full-stack web application created with Node, Express.js, React.
- Used Express to manage the server and routes.
- Used Node to query and routed data in the app.
- Used React to generate the frontend.
- Used express-session to handle sessions in Node.js.
- Create the React app by using create-react-app, and install the associated dependencies mentioned in the package.json.
- Make a package.json file by running npm init from the command line in the backend.
- Create a server.js file.
- Install the Express npm package: npm install express express-session
- Install other associated packages mentioned in the package.json in the backend.
- Require the following npm packages inside of the server.js file:
- Express
- Express-session - used to handle sessions in Node.js.
- Create a folder named routes.
- In routes, make the following files and folders:
- index.js: create a set of routes to render all the routes with /api url.
- Inside the API folder there is an index.js to create a tree of various routes as follows:
- auth.js: create a set of routes to authenticate a user and handle the log out In general, we have two routes to handle authentication: api/user/auth and api/user/logout
Create the frontend using React.