35 lines
860 B
Markdown
35 lines
860 B
Markdown
# TypeScript x Express x Node.js x Sqlite
|
|
|
|
This is a simple Express server to manage Web Push notifications for a website It is configured with Nodemon for automatic server restarts during development and uses ts-node for TypeScript execution.
|
|
|
|
## Prerequisites
|
|
|
|
If you have `asdf` installed, run `asdf install`. Otherwise, install the version of Node specified in `.tool-versions`.
|
|
|
|
## Installation
|
|
|
|
Clone the repository to your local machine:
|
|
|
|
```
|
|
npm install
|
|
# generate env config
|
|
npm run gen-secrets
|
|
```
|
|
|
|
## Usage
|
|
|
|
After you've set up your env file, spin up the server
|
|
|
|
```
|
|
npm run dev
|
|
```
|
|
|
|
This will start the server at `http://localhost:3000` by default. Let your app/site use its API to manage subscriptions and send out Push notifications.
|
|
|
|
For production, run the following commands:
|
|
|
|
```
|
|
npm run build
|
|
npm start
|
|
```
|