Skip to content

REFSZIN/projeto14-smartcell-store-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Cell Store

Built With

Librariess

Description

SmartCellStore is a back-end application, an REST API.


Features

  • User sign-up and sign-in
  • Create cart.
  • Order Checkout by Cart User id.
  • View products.

API Reference

User Sign Up

https://projeto14-smartcell-store-front.vercel.app/
POST /auth/sign-up

Request:

Body Type Description
name string Required. user name
email string Required. user email
password string Required. user password
confirmPass string Required. user confirmpass

Response:

{
  "message": "User successfully registered!"
}

confirmPass must match password

User Sign In

https://projeto14-smartcell-store-front.vercel.app/
POST /auth/sign-ip

Request:

Body Type Description
email string Required. user email
password string Required. user password

Response:

{
  "token": "bcript authorization token"
}

User Sign In

https://projeto14-smartcell-store-front.vercel.app/
POST /products

Request:

Body Type Description

Response:

{
  [...Products]
}

Environment Variables

To run this project, you will need to add the following environment variables to your .env file DATABASE_URL = postgres://UserName:Password@Hostname:5432/DatabaseName PORT = number #recommended:5000

Run Locally

Clone the project

  git clone 

Go to the project directory

  cd projet

Install dependencies

  npm install

Start the server

  npm run dev

Run tests

  npm test

Acknowledgements