Skip to content

webchainro/int-node-b54abv5y

Repository files navigation

Live Coding Interview - Money Transfer API

Given:

  • 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 pg driver 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.

Getting Started

docker-compose up --build

The 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.


Task

Create an API endpoint for handling money transfers between users.

Expected Success Response

{
  "message": "Transaction successful",
  "sender": {"id": 1, "username": "Alice", "balance": 800.00},
  "receiver": {"id": 2, "username": "Bob", "balance": 1200.00}
}

Expected Failure Response

{
  "error": "Proper error message here..."
}

About

node.js live coding interview

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors