Skip to content

gobarber project setup. it can be used as a draft to make some tests or even to work on new features.

License

Notifications You must be signed in to change notification settings

Guribeiro/gobarber-api

Repository files navigation

Logo

Express Application for GoBarber project

The best way to schedule your service!

GitHub top language Repository size GitHub last commit Repository issues GitHub

About the project      |      Technologies      |      Getting started      |      How to contribute      |      License

Run in Insomnia

💇🏻‍♂️ About the project

This api provides everything needed to organize appointments between the barbers and customers.

Customers can choose the best time available to them.

Providers can see all their appointments, manage the times, also see if one client canceled the schedule.

🚀 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 you to use docker 🐳

Clone the project and access the folder

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

Follow the steps below

Install the dependencies

$ yarn

or

$ yarn install

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

I'm using port 5433, you can see it in the ormconfig.json file, feel free to use any port you prefer

I recommend you to use the same port as i'm using, if you just don't remember to change it in the command below

Remember to change the port in the ormconfig.json file if you don't want to get any errors

$ docker run --name softwrap-postgres -e POSTGRES_USER=docker \
              -e POSTGRES_DB=softwrap -e POSTGRES_PASSWORD=docker \
              -p 5433: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

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!


🤔 How to contribute

Make a fork of this repository

Fork using GitHub official command line

If you don't have the GitHub CLI, use the web site to do that.

$ gh repo fork guribeiro/gobarber-api

Follow the steps below

Clone your fork

$ git clone your-fork-url && cd gobarber-api

Create a branch with your feature

$ git checkout -b my-feature

Make the commit with your changes

$ git commit -m 'feat: My new feature'

Send the code to your remote branch

$ git push origin my-feature

After your pull request is merged, you can delete your branch

📝 License

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


Made with 💜   by Gustavo Henrique 👋   See my linkedin

About

gobarber project setup. it can be used as a draft to make some tests or even to work on new features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages