-
Notifications
You must be signed in to change notification settings - Fork 2
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 #58 from evry-ace/feature/typescript
Typescript support
- Loading branch information
Showing
16 changed files
with
7,064 additions
and
2 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
node_modules/ | ||
.idea/* | ||
.env | ||
node_modules | ||
*.tsbuildinfo | ||
node-ts/src/**/*.js | ||
node-ts/src/**/*.js.map | ||
*.tsbuildinfo |
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 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
] | ||
} |
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,57 @@ | ||
|
||
# Iskaribot.node | ||
|
||
Message-relaying bot for cross-posting messages between platforms. | ||
|
||
|
||
## Run Locally | ||
|
||
Clone the project | ||
|
||
```bash | ||
# Clone the project | ||
git clone https://github.com/evry-ace/iskaribot.git | ||
|
||
# Go to the project directory | ||
cd iskaribot/node | ||
|
||
# Install dependencies | ||
npm install | ||
|
||
# Define environment variables in .env | ||
|
||
# Build the program | ||
npm run build | ||
|
||
# Start the server | ||
npm run start | ||
|
||
|
||
``` | ||
- Start ngrok | ||
- Set uri for the ngrok tunnel in workplace integrations | ||
- `Admin Panel > Integrations > Iskaribot > Webhooks > Groups` | ||
- callback URL: `https://<ngrok-tunel-domain>/workplace` | ||
- Verify token: same as in .env | ||
- | ||
Ngrok and the server needs to run to validate server when saving webhook config | ||
|
||
|
||
|
||
## Environment Variables | ||
|
||
To run this project, you will need to add the following environment variables to your .env file | ||
|
||
`PORT` Port the server runs on. | ||
|
||
`WORKPLACE_APP_ID` Found under 'details' in workplace. | ||
|
||
`WORKPLACE_APP_SECRET` Found under 'details' in workplace. | ||
|
||
`WORKPLACE_ACCESS_TOKEN` Generated in workplace under details. can only be viewed once. | ||
|
||
`WORKPLACE_VERIFY_TOKEN` Self-defined, must be the same in workplace config and .env file. | ||
|
||
`SLACK_URL` Url for the webhook used for posting messages. | ||
|
||
|
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,6 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; |
Oops, something went wrong.