/thirsty-jotter-typescript-api

The ThirstyJotter API is a RESTful interface designed for plant enthusiasts, users of the ThirstyJotter app. Dive into the world of botanical care with the ThirstyJotter app and watch your plants flourish.

Primary LanguageTypeScript

Thirsty Jotter API

This is Restful API that serves the Thirsty Jotter app.

Project dependencies

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

Environmental variables

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

Endpoints

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.

Deploying

To build docker image:

docker build -t thirsty-jotter-typescript-api .

Testing

Resources

TODO