micro
is a TypeScript application that monitors seismic activity and posts seismic information to Discord. The application connects to the WebSocket API to receive earthquake data, processes the information, and posts it with relevant details using the Discord Webhook.
- Connects to a WebSocket API to receive earthquake data.
- Processes seismic intensity and event codes.
- Posts formatted earthquake information to a service using the Discord Webhook.
- Node.js (version 20 or higher)
- yarn (or yarn, although this project prefers yarn)
-
Clone the repository:
git clone https://github.com/evacuate/micro.git
-
Navigate to the project directory:
cd micro
-
Install dependencies:
yarn install
Create a .env
file in the root directory and add your credentials:
DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
-
Build: Compile the TypeScript files to JavaScript
yarn run build
-
Development: Run the application in development mode with live reloading
yarn run dev
-
Format Code: Format code
yarn run format
-
Lint Code: Lint code
yarn run lint
-
Start: Run the application using compiled JavaScript
yarn run start
-
Typecheck: Check TypeScript types
yarn run typecheck
-
Ensure your
.env
file is correctly configured. -
Run the application:
yarn run start
-
The application establishes a WebSocket connection, then listens for seismic data and posts relevant information when an event is detected.
Contributions Welcome! You can contribute in the following ways.
- Create an issue - propose a new feature. Report a bug
- Pull Request - Fix a bug or typo Refactoring the code
- Share - Share your thoughts on blogs, Twitter, etc.
For more details, see docs/CONTRIBUTING.md.
I proposed, facilitated, and developed the entire project.
- Minagishl (@minagishl)
This project is licensed under the MIT License. See the LICENSE file for details.