Skip to content

Hacker news clone API using expressjs (hacker news is a webapp that allows the coders to share any recourses with other coders )

Notifications You must be signed in to change notification settings

yusufmsabeh/hacker-news-clone

Repository files navigation

Getting Started

Installation

git clone https://github.com/yusufmsabeh/hacker-news-clone.git
cd shop-expressjs
npm i
npm start

Configuration

To configure the application, you must create a .env file in the root directory of the project. The following variables must be defined in the .env file:

# random value to use as a access token secret
ACCESS_TOKEN_SECRET=

# The port which the application will run on
PORT=

Usage

This API provides the following endpoints:

Authorization End-points

POST/login

Login and get access token

POST/signup

Creates new user account

User End-points

POST/updateuser

updates public user data

POST/updateusername

Updates username

POST/updatepassword

Updates a user password

POST/deleteuser

Deletes a user account from database

Posts End-points

POST/posts

Creates a new posts in the database

GET/posts

Retrieves a list of posts from the database

GET/posts?:user_id

Retrieves a list of posts for a specific user from the database


Run in Postman


API schema

About

Hacker news clone API using expressjs (hacker news is a webapp that allows the coders to share any recourses with other coders )

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published