Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gustavovalle23/restaurant-monolith-node
https://github.com/gustavovalle23/restaurant-monolith-node
docker docker-compose koajs nodejs postgresql prisma taskfile
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/gustavovalle23/restaurant-monolith-node
- Owner: gustavovalle23
- Created: 2023-02-14T02:35:21.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-18T02:46:24.000Z (over 1 year ago)
- Last Synced: 2024-10-16T19:12:20.404Z (3 months ago)
- Topics: docker, docker-compose, koajs, nodejs, postgresql, prisma, taskfile
- Language: JavaScript
- Homepage:
- Size: 591 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Application Setup
### Prerequisites
- Node.js (v14 or higher)
- Docker (if using Docker for running the application in a container)### Installation
1. Clone the repository to your local machine.```bash
git clone [email protected]:gustavovalle23/restaurant-monolith-node.git
```2. Navigate to the project directory.
```bash
cd restaurant-monolith-node
```3. Install dependencies.
```bash
yarn install
```### Database Setup
The application uses Prisma for database management. Follow the steps below to set up the database:
1. Up the database migration to create the initial schema.
```bash
task run:db
```2. Run the database migration to create the initial schema.
```bash
task prisma
```### Running the Application
1. Start the application.
At local machine:
```bash
node index.js
```Container:
```bash
task run
```2. Enter the container to access the application.
```bash
task app
```### Testing the Application
Use a REST API client (such as Postman or cURL) to test the application. Send a POST request to the following URL with the request body as shown below:
```
POST {{baseUrl}}:3000/users
Content-Type: application/json{
"name": "myuser",
"password": "mypassword",
"email": "[email protected]",
"birthDate": "1999-01-01",
"address": {
"country": "BR",
"state": "SP",
"street": "Fake Street",
"number": 23
}
}
```