Skip to content

Merin-Yilmaz/NC-News

Repository files navigation

Welcome to NC News! 👋

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.

Install

In order to use this repo and run it locally, you will need to do the following:

  1. Clone the repo from gitHub on your local machine
$ https://github.com/Merin-Yilmaz/NC-News.git
  1. 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

Usage

npm run start

** IMPORTANT **

You will need to create the necessary environment variables in the top level of your folder

Please create 3 files:

  1. .env.test
  2. .env.development
  3. .env.production

Into each, the correct database name will need to be added:

  1. In the .env.test file, please add:

PGDATABASE=nc_news_test

  1. In the .env.development file, please add:

PGDATABASE=nc_news

  1. 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

Run Project

You can now seed data to the local database by running the command:

$ npm run setup.dbs

Run Tests

npm run test app

Author

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 23