-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from ben-xD/android-push-tool-deno
feat(tools): add android tool for sending push notifications using Node
- Loading branch information
Showing
7 changed files
with
2,109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Android tools for push notifications | ||
|
||
## Setup | ||
- Install Node | ||
- Install pnpm: `npm install --global pnpm` | ||
- Install dependencies: `pnpm install` | ||
|
||
## Usage | ||
- Create a env file: `cp example.env .env` | ||
- Update `.env` file with your credentials. This file is git ignored won't be committed to the repo. | ||
- Run script: run `pnpm start` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Taken from the application (either manually out of the stdout of Push example app, your own app or programatically sent to your servers). | ||
FCM_REGISTRATION_TOKEN= | ||
GOOGLE_APPLICATION_CREDENTIALS=/Users/zen/.android/example-app-firebase-adminsdk-123-abc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "push-tool-android", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "tsx send_android.ts" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"dotenv": "^16.3.1", | ||
"firebase-admin": "^11.10.1", | ||
"tsx": "^3.12.7", | ||
"zod": "^3.21.4" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.4.5", | ||
"typescript": "^5.1.6" | ||
} | ||
} |
Oops, something went wrong.