The project is an API that allows for programmatic access to application data (game reviews). The API is designed to mimic a real-world backend service, such as Reddit, and will provide data to the front-end architecture. The database used in this project is PostgreSQL and it will be interacted with using the node-postgres library.
To get a list of all endpoints: GET: /api
run the following into a directory of your choice in the terminal:
git clone https://github.com/H3nry-T/backend-project-nc-games.git
Install dependencies in the terminal using the following:
npm install
Here is what you should have in the package.json file in the root:
"dependencies": { "dotenv": "^16.0.0", "express": "^4.18.2", "pg": "^8.7.3", "supertest": "^6.3.3" }, "devDependencies": { "husky": "^8.0.2", "jest": "^27.5.1", "jest-extended": "^2.0.0", "pg-format": "^1.0.4" },
- make a dotenv file called
.env.test
- Setup your dotenv file to include the following:
PGDATABASE=nc_games_test
- make a dotenv file called
.env.development
- Setup your dotenv file to include the following:
PGDATABASE=nc_games
npm run setup-dbs
npm run seed
npm run test
Node.js: v18.12.1
Postgres: v15.1