Schedule Haircuts & Shaves services
About | Technologies | Getting started | Running tests | License
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 that I used to develop this api
- Node.js
- bcryptjs
- celebrate
- class-transformer
- cors
- Date-fns
- dotenv
- Express
- express-async-errors
- handlebars
- ioredis
- Multer
- TypeScript
- TypeORM
- JWT-token
- uuid v4
- PostgreSQL
- MongoDB
- Redis
- Jest
- Eslint
- Prettier
- EditorConfig
Import the Insomnia.json
on Insomnia App or click on Run in Insomnia button
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!
# Run the jest tests
$ yarn test
This project is licensed under the MIT License - see the LICENSE file for details.
Made with 💜 by Arllain 👋 See my linkedin