Coder Social home page Coder Social logo

store-api's Introduction

Store Api

Api made for furniture store with Node.js,Express.js,MongoDB & Mongoose

Demo

store.api.video.mp4

Screenshots

image

image

image

image

API Reference

Get all products

  GET /api/v1/products

Get all products (based on filtering)

  GET /api/v1/products?query=.......

Query

1) name

Query Type Description
name string fetch similar pattern name

2) featured

Query Type Description
featured boolean fetch featured/non-featured products

3) company

Query Type Description
company string fetch products from company-list(ikea/caressa/liddy/marcos)

4) sort

Query Type Description
sort string sort products on any basis (eg: name -> ascending order / -name -> descending oder)

5) fields

Query Type Description
fields string fetch selected fields of products (eg : name,price)

6) limit

Query Type Description
limit integer limit the fetch quantity of products

7) page

Query Type Description
page integer fetch according to page

8) numericFilters

Query Type Description
numericFilters conditions fetch according to conditions (>,>=,=,<,<=) [eg: price>=40,rating>4.5]

Get all products - testing

  GET /api/v1/products/static

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

MONGO_URI = mongodb+srv://:@nodeexpressprojects.50qvu.mongodb.net/myFirstDatabase?retryWrites=true&w=majority

PORT = port no you want to run in

npm packages used

dependensies

express

  npm i express --save

mongoose

  npm i mongoose

dotenv

  npm i dotenv

dev-dependensies

nodemon

  npm i nodemon

Run On Local-Machine

To startup nodemon

  npm start

Manual start

  node app.js

Explicit port initialization

  PORT=<port-no> npm start
  PORT=<port-no> node app.js

store-api's People

Contributors

saikatxshrey avatar

Stargazers

Riya Mandal avatar

Watchers

 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.