Skip to content

GoBarber Rest API - with express framework, docker, postgreSQL, typeORM, typescript

License

Notifications You must be signed in to change notification settings

arllain/gobarber-api

Repository files navigation

gobarber

Rest API for GoBarber apps

Schedule Haircuts & Shaves services

GitHub top language Made by Repository size GitHub last commit Repository issues GitHub

About   |    Technologies   |    Getting started   |    Running tests   |    License

Run in Insomnia

🧐 About

This api is to be consumed by GoBarber Web and GoBarber Mobile, where you can make appointments between barbers and customers.

To see the web client, click here: GoBarber Web
To see the mobile client, click here: GoBarber Mobile

🚀 Technologies

Technologies that I used to develop this api

💻 Getting started

Import the Insomnia.json on Insomnia App or click on Run in Insomnia button

Requirements

Obs.: I recommend use docker

Clone the project and access the folder

$ git clone https://github.com/arllain/gobarber-api.git && cd gobarber-api

Follow the steps below

# Install the dependencies
$ yarn

# Make a copy of '.env.example' to '.env'
# and set with YOUR environment variables.
# The aws variables do not need to be filled for dev environment
$ cp .env.example .env

# Create the instance of postgreSQL using docker
$ docker run --name gobarber-postgres -e POSTGRES_USER=docker \
              -e POSTGRES_DB=gobarber -e POSTGRES_PASSWORD=docker \
              -p 5432:5432 -d postgres

# Create the instance of mongoDB using docker
$ docker run --name gobarber-mongodb -p 27017:27017 -d -t mongo

# Create the instance of redis using docker
$ docker run --name gobarber-redis -p 6379:6379 -d -t redis:alpine

# Make a copy of 'ormconfig.example.json' to 'ormconfig.json'
# and set the values, if they are not filled,
# to connect with docker database containers
$ cp ormconfig.example.json ormconfig.json

# Once the services are running, run the migrations
$ yarn typeorm migration:run

# To finish, run the api service
$ yarn dev:server

# Well done, project is started!

🔧 Running tests

# Run the jest tests
$ yarn test

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with 💜 by Arllain 👋 See my linkedin

About

GoBarber Rest API - with express framework, docker, postgreSQL, typeORM, typescript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published