This is a sample Express.js application demonstrating the usage of the TypeScript ORM library with SQLite.
cd example
npm installnpm startOr for development with auto-reload:
npm run devThe server will start on http://localhost:3000
GET /- API documentationGET /health- Database health checkGET /users- Get all usersGET /users/:id- Get user by IDPOST /users- Create a new userPUT /users/:id- Update a userDELETE /users/:id- Delete a user
curl -X POST http://localhost:3000/users \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"[email protected]","age":30}'curl http://localhost:3000/userscurl http://localhost:3000/users/1curl -X PUT http://localhost:3000/users/1 \
-H "Content-Type: application/json" \
-d '{"name":"John Updated","email":"[email protected]","age":31}'curl -X DELETE http://localhost:3000/users/1The application uses SQLite and creates a file example.db in the example directory.