This is Restful API that serves the Thirsty Jotter app.
- express: Fast, un-opinionated, minimalist web framework for Node.js.
- typescript
- xata.io SDK
- dotenv: Zero-dependency module that loads environment variables from a .env file into process.env.
- cors: Express middleware to enable CORS with various options.
- helmet: Express middleware to secure your apps by setting various HTTP headers, which mitigate common attack vectors.
- PORT - the port on which the server should start. If not specified, it will default to port no. 4000
- XATA_API_KEY
- XATA_BRANCH
For the xata API keys, you need to have xata CLI installed locally and follow the instructions from their docs.
You can checkout the API documentation by navigating to http://localhost:8080/api-docs/
. This documentation is powered by Swagger following the OpenAPI 3.0 specifications.
To build docker image:
docker build -t thirsty-jotter-typescript-api .
- https://auth0.com/blog/node-js-and-typescript-tutorial-build-a-crud-api/
- https://retool.com/use-case/admin-panels
- https://github.com/OpenIdentityPlatform/OpenAM/wiki/Stateful-vs-Stateless-Authentication
- vitest-dev/vitest#4124
- Swagger: The Pet Store repository
- Swagger: The source API definition for the Pet Store
TODO
- [] Add integration tests for xata. this might help: https://github.com/xataio/client-ts/blob/main/test/utils/setup.ts#L142
- Implement functionality to create new users.