- A prebuilt Node.js + TypeScript project inside a Docker container.
- A predefined PostgreSQL database.
- The database is configured via Docker Compose.
- Node.js, TypeScript, and the
pgdriver are already installed. - You are free to install and use any framework (Express, etc.) and ORM/query builder (TypeORM, raw SQL, etc.) of your choice.
- Models, routes, and server need to be implemented.
docker-compose up --buildThe API server will be available at http://localhost:8000.
File changes are automatically reloaded.
Database connection is available via environment variables:
DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD.
Create an API endpoint for handling money transfers between users.
{
"message": "Transaction successful",
"sender": {"id": 1, "username": "Alice", "balance": 800.00},
"receiver": {"id": 2, "username": "Bob", "balance": 1200.00}
}{
"error": "Proper error message here..."
}