Skip to content

ZeyadTarekk/ShoppingStore-REST-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e4d1292 Β· Sep 21, 2022

History

62 Commits
Sep 17, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 21, 2022
Sep 16, 2022
Sep 16, 2022
Sep 16, 2022
Sep 17, 2022
Sep 16, 2022

Repository files navigation

GitHub contributors GitHub issues GitHub license GitHub forks GitHub stars GitHub Language

πŸ“ Table of Contents

πŸ“™ About

  • A RESTful API to support online store.

πŸ”š API Endpoints

Products

  • Index GET /products
  • Show GET /products/:product_id
  • Create [token required] POST /products

Users

  • Index [token required] GET /users
  • Show [token required] GET /users/:user_id
  • Create [token returned] POST /users

Orders

  • Current Order by user [token required] GET /orders/:user_id
  • Completed Orders by user [token required] GET /completedorders/:user_id

🏁 Getting Started

This is an list of needed instructions to set up your project locally, to get a local copy up and running follow these instructuins.

Installation

  1. Clone the repository
$ git clone https://github.com/ZeyadTarekk/ShoppingStore-REST-API.git
  1. Navigate to repository directory
$ cd ShoppingStore-REST-API
  1. Install dependencies
npm install

Running

  1. Create .env file and add your environment variables
  • POSTGRES_HOST
  • POSTGRES_DB
  • POSTGRES_TEST_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • ENV="dev"
  • BCRYPT_PASSWORD
  • SALT_ROUNDS
  • TOKEN_SECRET
  1. Running database migrations
npm run migrateup
  1. Running on development mode
npm run start

Building for production

  1. Compiling for production mode
npm run build

Running Tests

npm run test

πŸ’» Built Using

  • Node.js
  • Express.js
  • TypeScript
  • PostgreSQL
  • Jasmine for testing

Contributors

Zeyad Tarek
Zeyad Tarek

License

This software is licensed under MIT License, See License for more information Β©ZeyadTarekk.

Releases

No releases published

Packages

No packages published