My first project! This API is a social news forum site, where you are able to interact, rate content and discuss topics with others, similarly to Reddit.
🏠 Homepage
In order to use this repo and run it locally, you will need to do the following:
- Clone the repo from gitHub on your local machine
$ https://github.com/Merin-Yilmaz/NC-News.git
- Install Packages & Dependencies This project uses node version v20.6.1, npm version 9.8.1 and postgres version 14.10 . Go check them out if you don't have them locally installed.
$ npm install
npm run start
You will need to create the necessary environment variables in the top level of your folder
Please create 3 files:
- .env.test
- .env.development
- .env.production
Into each, the correct database name will need to be added:
- In the .env.test file, please add:
PGDATABASE=nc_news_test
- In the .env.development file, please add:
PGDATABASE=nc_news
- In the .env.production file, please add:
DATABASE_URL={ your database url }
Once the variables have been created, you will need to double check that these .env files are .gitignored. If not, add them to the .gitignored file by writing under node_modules: .env.development .env.test .env.production
You can now seed data to the local database by running the command:
$ npm run setup.dbs
npm run test app
- Github: @Merin-Yilmaz
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!