https://github.com/arnav-kr/node-shuttle
Node.js Project Template for hosting on shuttle.dev (previously shuttle.rs)
https://github.com/arnav-kr/node-shuttle
hosting nodejs rust rust-lang shuttle-rs
Last synced: 13 days ago
JSON representation
Node.js Project Template for hosting on shuttle.dev (previously shuttle.rs)
- Host: GitHub
- URL: https://github.com/arnav-kr/node-shuttle
- Owner: arnav-kr
- License: agpl-3.0
- Created: 2024-04-03T13:41:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-15T07:53:50.000Z (5 months ago)
- Last Synced: 2025-05-12T21:12:46.164Z (13 days ago)
- Topics: hosting, nodejs, rust, rust-lang, shuttle-rs
- Language: Rust
- Homepage: https://arnav.is-a.dev/node-shuttle
- Size: 91.8 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Node.js on shuttle.dev Template
This Template is a starting point for creating a Node.js project on the shuttle.dev. It is a simple discord bot template that can be used to create a discord bot using the discord.js library, or any other Node.js project.**Example of a bot running on shuttle.rs:**
## Pre-requisites
- [rust](https://www.rust-lang.org/tools/install) installed
- [cargo-shuttle CLI](https://docs.shuttle.dev/getting-started/installation) installed
- [Node.js](https://nodejs.org/en/download/) installed (obv)## Getting Started
- Create a new project using the template
```bash
shuttle init --from arnav-kr/node-shuttle
```
- rename `Secrets.example.toml` to `Secrets.toml` and put your environment variables there. Those will be deployed to the shuttle.dev project.- deploy the project
```bash
npm run deploy
```## Deploy via GitHub Actions
The template comes with a GitHub Actions workflow that deploys the project to shuttle.dev on every push to the main branch.
> [!IMPORTANT]
> To enable the workflow, you need to add the [`SHUTTLE_TOKEN`](https://console.shuttle.dev/account/overview) and `SHUTTLE_PROJECT_ID` to the repository secrets.## Development
use general node workflow for development.## Adding to an existing project
Copy the following files to your project:
- [x] [`Shuttle.toml`](Shuttle.toml) (rename names according to your project, include any additions assets here)
- [x] [`Cargo.toml`](Cargo.toml) (rename names according to your project)
- [x] [`src/main.rs`](src/main.rs)
- [x] [`shuttle_run.sh`](shuttle_run.sh)
- [x] [`shuttle_setup_container.sh`](shuttle_setup_container.sh)
- [x] add shuttle related entries to [`.gitignore`](.gitignore)
- [x] (optional) [`Secrets.example.toml`](Secrets.example.toml) (rename to `Secrets.toml` and add your environment variables)
- [x] (optional) [`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) (if you want to deploy via GitHub Actions)deploy the project using `npm run deploy`
## License
This project is licensed under the AGPL 3.0 License - see the [LICENSE](LICENSE) file for details## Author
[Arnav Kumar (@arnav-kr)](https://github.com/arnav-kr)