- Node.js v20
Web application written in React (bootstrapped from Create React App). Runs on http://localhost:3000. Uses React Redux Toolkit for state management.
Simple vanilla Node.js backend server for REST API. Runs on http://localhost:8000. Available endpoints:
-
/users/registerPOSTRequest:
{ email: string, password: string }Response:
{ id: string, email: string, balance: number }Error:
{ error: string } -
/users/loginPOSTRequest:
{ email: string, password: string }Response:
{ id: string, email: string, balance: number }Error:
{ error: string } -
/users/acount/top-upRequest:
{ userId: string, amount: number }Response:
{ newBalance: number }Error:
{ error: string }
Contains TypeScript type definitions shared by web and api.
npm run api- start backend server (localhost:8000)npm run web- start web app server (localhost:3000)npm run test- run unit tests