https://github.com/jonathanlb/cat-wrangler-v2
reworking of cat-wrangler rsvp system backend
https://github.com/jonathanlb/cat-wrangler-v2
Last synced: 12 months ago
JSON representation
reworking of cat-wrangler rsvp system backend
- Host: GitHub
- URL: https://github.com/jonathanlb/cat-wrangler-v2
- Owner: jonathanlb
- Created: 2022-03-12T21:52:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T14:46:12.000Z (over 1 year ago)
- Last Synced: 2025-03-18T06:48:11.472Z (about 1 year ago)
- Language: TypeScript
- Size: 617 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
### Node dependencies
Running `npm i` will download and nominally install all the dependencies.
[sqlite3](https://www.npmjs.com/package/sqlite3) installation can be tricky.
Running the unit tests with `npm t` will trigger a failure with sqlite3 if there is a problem.
You can build sqlite3 from source with
```
npm --build-from-source install sqlite3
```
### .env file
Create and edit an `.env` file to load server environment variables.
The `sample.env` file serves as a template.
### Certificates
Copy your CA, certificate, and key pem files the location specified in `.env`.
### Start the server
```
npm run build
DEBUG='rsvp:*' nohup npm run start &
```
## Administration
### Creating an Event
The `npm run build` script compiles a `dist/createEvent.js` node script that
can insert a new event from a JSON file into the database with usage:
```
DEBUG='*' node dist/createEvent data/sample-event.json data/rsvps.sqlite
```
Where the event configuration is JSON in the form of
```
{
"name": "Extravaganza",
"venue": 37,
"description": "# Best Test Event Evuh\nRSVP or ....",
"dateTimes": [
{ "yyyymmdd": "2018-12-01", "hhmm": "8:39", "duration": "45m" },
{ "yyyymmdd": "2018-12-01", "hhmm": "9:06", "duration": "45m" }
]
}
```
You can optionally specify a `dateTime` field in the form of the index of the
possible `dateTimes` to limit users' choices to one.
The JSON configuration is only lightly typechecked.
You may omit the SQLite file option and use the configuration from [`.env`](sample.env), the `RSVPS_SQLITE` environment varibale, or the default
`data/rsvps.sqlite`.
### Deleting an Event
```
DEBUG='*' node dist/deleteEvent data/rsvps.sqlite
```
TODO: fuzzy select by event title string
## Updates to V2
- Move to Typescript.
- Intercept (clean up) authentication with `Express.Application.use()`.
- Use Cognito authentication.
- Update SQLite access to supported Promise wrapper.