add a README.md with basics, and target pnpm instead of npm
This commit is contained in:
34
README.md
Normal file
34
README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
A lightweight Express service that schedules and sends Firebase Cloud Messaging (FCM) push notifications to wake up registered devices.
|
||||||
|
|
||||||
|
## Dev
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit .env — set FIREBASE_SERVICE_ACCOUNT_JSON
|
||||||
|
Here is one way to generate the contents: `cat your-downloaded-key.json | jq -c .`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm install
|
||||||
|
pnpm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
The server starts on `http://localhost:3000` (or the port in `PORT`). Hot-reloads on file changes.
|
||||||
|
|
||||||
|
Set `NODE_ENV=test-local` in `.env` to bypass JWT expiry verification during local development.
|
||||||
|
|
||||||
|
## Production
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm install --omit=dev
|
||||||
|
pnpm start
|
||||||
|
```
|
||||||
|
|
||||||
|
Required environment variables:
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
|---|---|
|
||||||
|
| `FIREBASE_SERVICE_ACCOUNT_JSON` | Inline service account JSON (one line). If unset, falls back to Application Default Credentials. |
|
||||||
|
| `PORT` | HTTP port (default: `3000`). |
|
||||||
|
| `FCM_TOKEN_DATA_DIR` | Directory for persisting registered FCM tokens (default: `./data`). |
|
||||||
3758
package-lock.json
generated
3758
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
2337
pnpm-lock.yaml
generated
Normal file
2337
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user