About the Challenge | Technologies | Routes | Installation | License
Application that allows the creation of customers, products and orders, where the customer can generate new purchase orders for certain products, such as a small e-commerce.
POST /customers
{
"name": "Customer name",
"email": "email@example.com"
}
POST /products
{
"name": "Product name",
"price": 1500,
"quantity": 5
}
POST /orders
{
"customer_id": "836d6d54-e8c3-4b07-ab2b-4e21360aac58",
"products": [
{
"id": "dcd0915f-4495-48a5-adfc-57ac51cee17d",
"quantity": 5
},
{
"id": "55fe82fe-3420-4df5-9965-da49a5d9bb15",
"quantity": 2
}
]
}
GET /orders/:id
- Install Docker https://www.docker.com/get-started and check if was installed with the command:
docker version
- Run the command
docker run --name gostack_postgres -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres
- Verify if container was created
docker ps -a
- Create a database with name
gostack_challenge09
- Clone the repository:
git@github.com:matheus-neves/challenge-typeorm-relations.git
- Access the directory:
cd challenge-typeorm-relations
- Install the dependencies:
yarn
- Run migrations:
yarn typeorm migration:run
- Run the server:
yarn dev:server
- Server running in
http://localhost:3333/
This challenge is under license from MIT. See the archive LICENSE for more details.
Challenge completed βοΈ
Made with π by Matheus Neves See my linkedin! π