Giter Site home page Giter Site logo

express-ecom-api's Introduction

express-ecom-api

  • Express js and MySql API.

Features

  • Register and Login as a user
  • Access route based on role.
  • Get the list of products, and product details, and update and delete a product.
  • Get a list of categories, and category details, and update and delete a product.

Requirements

  • Nodejs
  • MySQL

Set up and Installation

  • Clone the repository
git clone https://github.com/Michael-Otieno/express-ecom-api/
  • Install dependencies
npm install bcryptjs body-parser cors express express-session jsonwebtoken mysql2 nodemon passport passport-local sequelize
  • Run project
npm start
  • Url
http://localhost:8080/

Structure

Endpoint HTTP Method CRUD Method Result
api/auth/signup POST CREATE Register a user
api/auth/signin POST POST Login a user
products/ GET GET Get a list of all products
products/add POST CREATE Add a product
products/:id GET GET Get product detail
products/:id PUT UPDATE Update product detail
products/:id DELETE DELETE Delete product
categories/ GET GET Get a list of all categories
categories/add POST CREATE Add a category
categories/:id GET GET Get category detail
categories/:id PUT UPDATE Update category detail
categories/:id DELETE DELETE Delete category

Use

  • Use Postman for testing the Rest API

License

  • License
  • Copyright (c) 2019 Michael Otieno

express-ecom-api's People

Contributors

michael-otieno avatar

Watchers

 avatar

express-ecom-api's Issues

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.