This repository is the server (back-end) starter code for Final Project - Full-Stack CRUD Application.
Prerequisites
- Install PostgreSQL (Postgres) [link] - required to run the database
- Install Postman [link] - optional tool for API testing
1. Use the following process to import the Final Project server starter code repository to your GitHub account as the starter codebase
- Log on to GitHub
- Click on the + sign in the top right corner (next to the user icon)
- In the dropdown menu, select "Import repository"
- A new page will open
- In "Your old repository’s clone URL" field, enter:
https://github.com/johnnylaicode/server-starter-code - In "Your new repository details" field, enter your own repository name (e.g., "final-project-server")
- Click on the "Begin import" button to start the process
- After the process completed, your new "final-project-server" repository is created – as a completely independent codebase
- From this point on, you can clone your new repository, make changes, create feature branches, and create/merge pull requests
After creating the starter codebase "final-project-server" repository on GitHub (see above), you can clone it to your local machine. The instructions on how to clone a GitHub repository are available at this link.
- Start a terminal (e.g., Git Bash) on your local machine.
- Go to the "final-project-server" folder, enter the command to install dependencies:
npm install - Start the server application by entering the command:
npm start - After the server application is successfully started, its access address is at:
http://localhost:5001
This error is related to the user password you set for your own local Postgres database.
In the server-starter-code/database/utils/configDB.js file, replace the dBpwd value with your password for Postgres database.
const dbName = 'starter-server';
const dbUser = 'postgres';
const dbPwd = '<your password>';