Link to Hosted Version:
https://ncn-network.onrender.com
Summary:
This project is a live database created from scratch using Node.js and PostgreSQL. It houses articles, topics, comments, and users, all within this codebase that can be queried, posted to, patched, or deleted as needed.
- Fork this repository.
- Copy the link of your forked repo.
- In your terminal, run:
git clone <the link of the forked repo>
npm install
To set up the databases, run:
npm run setup-dbs
npm run seed
Install required testing libraries:
npm install jest jest-extended jest-sorted supertest --save-dev
Run tests:
npm t NCN.test.js
If you need access to the necessary environment variables to connect to the databases locally for development purposes, follow these steps:
- Create a file in the root directory called .env.developer.
- Set the following environment variable in .env.developer:
- PGDATABASE=(your-database-name-here)
- You can find the database name in setup.sql.
- Use the non-test database for the developer environment variable.
- Create another file in the root directory called .env.test.
- Set the following environment variable in .env.test:
- PGDATABASE=(your-test-database-name-here)
- You can find the test database name in setup.sql.
- Use the test database for the test environment variable.
Node.js Version: 20.10.0 (default)