/advalue-backend

Backend api for advalue e-commerce project

Primary LanguageTypeScriptMIT LicenseMIT

Vital Backend

Repository size GitHub top language GitHub language count GitHub last commit PRs Welcome GitHub


🚧 In construction 🚧


✅ Table of contents


🛠 Technologies

This project was developed with the following technologies:


❗How to Use

Clone and Install

From your command line:

# Clone this repository
$ git clone https://github.com/NahtanN/vital-backend 

# Go to the repository
$ cd vital-backend

# Install all dependencies
$ yarn install

Define database and AWS settings

Before starting the server you will need to define some environment variables. Rename the file .env.example to .env and replace then:

# This variable will enable to save the images in the AWS
# EX: 3000
PORT = 

# AWS S3 settings
AWS_ACCESS_KEY_ID = 
AWS_SECRET_ACCESS_KEY = 
AWS_BUCKET_NAME = 
AWS_DEFAULT_REGION = 

# Defines the database connection
# Ex: 
# postgres://userName:password@host:port/defaultDatabase
# mongodb+srv://user:password@cluster.xjf5z.mongodb.net/database
DATABASE_URL = 

If you want to save the images in the localhost instead of AWS, remove the PORT variable and add the following environment variable:

# Used in development
# Defines the image URL when in local storage
# Ex: http://localhost:3000
APP_URL = 

For more details of how to configure the AWS, read the documentation link

Start the server

$ yarn dev

⚙️ Helpful

If you are using Insomnia to manage the routes, you can import the data from Insomnia.json at public folder for faster access.


Author


Nathan Gomes

License

This project could be used by anyone! MIT License.