Giter Site home page Giter Site logo

ik-assignment's Introduction

About The Project

Go to http://localhost:8085/api-docs to see the API documentation.

Technologies Used

API documentation is generated using swagger.
Logging is done using winston.
Linting is done using eslint.
Code formatting is done using prettier.
Database is mongodb.
Database is connected using mongoose.
Authentication is done using json web token jsonwebtoken.
Passwords are hashed using bcrypt.

Directory Structure

Routes are defined in src/controllers directory. Models are defined in src/models directory. Services are defined in src/services directory. Middlewares are defined in src/middlewares directory.

API Endpoints

  1. Problems 1, 2 and 3

Method Endpoint Description Is Protected?
POST /api/problem-1-scrapping/scrap Problem 1 No
GET /api/problem-2-api/call-api Problem 2 No
GET /api/problem-3-fs/read-files Problem 3 No

  1. Problem 4 - Posts CRUD

Method Endpoint Description Is Protected?
GET /api/problem-4-posts-crud/ Get All Posts No
GET /api/problem-4-posts-crud/:post_id Get Post By ID No
POST /api/problem-4-posts-crud Create Post No
PATCH /api/problem-4-posts-crud/:post_id Update Post by ID No
DELETE /api/problem-4-posts-crud/:post_id Delete Post by ID No

  1. Problem 5 - Authentication

Method Endpoint Description Is Protected?
POST /api/problem-5-auth/signup Register User No
POST /api/problem-5-auth/login Login User No
GET /api/problem-5-auth/me Get Logged In User Yes (Get Token using /api/users/login API)

Project Setup

yarn install

Start Development Server

Create a .env file in the root directory and add variables from .env.sample

yarn run start:dev

it will start the development server on the port specified in .env file. Default port is 3000 if not specified in. You will be able to see the app running on http://localhost:8085 or the port specified in .env file. Now, to go to http://localhost:8085/api-docs to see the API documentation.

Build For Production

yarn run build

Start The Production Server

yarn start

Fix Lint Errors

yarn run lint

ik-assignment's People

Contributors

septem072 avatar

Watchers

Ali Raza Khan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.