NorthCoders-News-API

所属分类:快速开发平台
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-10-05 00:19:11
上 传 者sh-1993
说明:  NorthCoders新闻API,,
(NorthCoders News API,,)

文件列表:
.DS_Store (8196, 2023-10-29)
.env-example (29, 2023-10-29)
.husky/ (0, 2023-10-29)
.husky/pre-commit (62, 2023-10-29)
__tests__/ (0, 2023-10-29)
__tests__/app.test.js (39544, 2023-10-29)
__tests__/utils.test.js (4051, 2023-10-29)
app.js (777, 2023-10-29)
controllers/ (0, 2023-10-29)
controllers/api-get.controller.js (253, 2023-10-29)
controllers/delete-comment.controller.js (319, 2023-10-29)
controllers/get-All-Articles.controller.js (619, 2023-10-29)
controllers/get-api-topics.controller.js (308, 2023-10-29)
controllers/get-article-comments.controller.js (617, 2023-10-29)
controllers/get-articles.controller.js (365, 2023-10-29)
controllers/get-selected-user.controller.js (349, 2023-10-29)
controllers/get-users.controller.js (230, 2023-10-29)
controllers/patch-article-id.controller.js (382, 2023-10-29)
controllers/patch-comment.controller.js (400, 2023-10-29)
controllers/post-article.controller.js (437, 2023-10-29)
controllers/post-comment.controller.js (380, 2023-10-29)
controllers/post-topics.controller.js (273, 2023-10-29)
controllers/queryTopic.controller.js (79, 2023-10-29)
db/ (0, 2023-10-29)
db/connection.js (463, 2023-10-29)
db/data/ (0, 2023-10-29)
db/data/development-data/ (0, 2023-10-29)
db/data/development-data/articles.js (37090, 2023-10-29)
db/data/development-data/comments.js (88974, 2023-10-29)
db/data/development-data/index.js (182, 2023-10-29)
db/data/development-data/topics.js (213, 2023-10-29)
db/data/development-data/users.js (1176, 2023-10-29)
db/data/test-data/ (0, 2023-10-29)
db/data/test-data/articles.js (5479, 2023-10-29)
db/data/test-data/comments.js (3033, 2023-10-29)
db/data/test-data/index.js (182, 2023-10-29)
db/data/test-data/topics.js (224, 2023-10-29)
db/data/test-data/users.js (595, 2023-10-29)
... ...

# Northcoders News API Link to the hosted version - https://benggs-nc-news.onrender.com/api/ Summary: This is a backend of a reddit style news site, allowing users to write articles, comment and vote on other articles and vote on other comments as well. The user is also able to filter and sort articles with pagination enabled. The project uses a postgres database using an express.js server and currently has 13 endpoints, which are described at - https://benggs-nc-news.onrender.com/api/ Minimum requirements: node version: v20.8.1 postgreSQL version: v15 Instructions to configure the process environments: 1. ensure the package 'dotenv' is installed. 2. create two .env files one called - .env.development and one called - .env.test 3. Within the development file write the line - PGDATABASE=nc_news 4. Within the test file write the line - PGDATABASE=nc_news_test You should now have access to the relevant databases! Instructions to run the project: 1. clone the project - 'git clone https://github.com/beng355826/NorthCoders-News-API.git' 2. run 'npm install' to install developer and production dependencies. 3. Ensure PostgreSQL is downloaded and running on your machine. 4. Run 'npm run setup-dbs' - this will create a local database 5. Run 'npm run seed' - this will seed the newly created database with development data. 6. The project should now be successfully installed and configured! Run 'npm run test app.test.js' to test the endpoints. Have fun!

近期下载者

相关文件


收藏者