https://github.com/tiste/gsheet2api
https://github.com/tiste/gsheet2api
fastify github-actions nodejs typescript
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tiste/gsheet2api
- Owner: tiste
- Created: 2022-06-02T09:50:14.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T11:03:17.000Z (over 2 years ago)
- Last Synced: 2023-12-12T12:24:12.066Z (over 2 years ago)
- Topics: fastify, github-actions, nodejs, typescript
- Language: TypeScript
- Homepage: https://swunitch-api.tiste.io/races
- Size: 730 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gsheet2api
[](https://github.com/tiste/gsheet2api/actions/workflows/ci.yml)
> Easily use a Google Sheet as a JSON api, self-hosted or deployed from a one-click button to Vercel.
## Configuration
| Name | Description |
| ---------- | ----------------------------------------- |
| GSHEET_URL | Public CSV url of your Google Sheet |
| API_KEY | Bearer api token to protect your endpoint |
| API_PATH | Default: `/`, path of your endpoint |
## Quick Start
Run `npm install` and `npm start` to launch API.
### Environment
First, create the env file: `cp .env{.sample,}` (or `op inject -i .env.sample -o .env`)
You can now set the values in `.env` file.
To load them, either you export manually each environment variables of the `.env` file such as: `export API_KEY=...`.
Or you can install `direnv` (`brew install direnv`), and allow sourcing from your current directory with `direnv allow`.
## Running tests
Run `npm test`
## Development
You can launch the API in dev mode, with `npm run start:dev`