Giter VIP home page Giter VIP logo

node-shuttle's Introduction

Node Shuttle


Node.js on shuttle.rs Template

This Template is a starting point for creating a Node.js project on the shuttle.rs. 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: Bot Running on shuttle.rs

Pre-requisites

Getting Started

  • Create a new project using the template

    cargo shuttle init --from arnav-kr/node-shuttle
  • rename shuttle/Secrets.example.toml to shuttle/Secrets.toml and put your environment variables there. Those will be deployed to the shuttle.rs server.

  • restart the project

    npm run shuttle:restart
  • deploy the project

    npm run shuttle:deploy

Note

First Deploy might take some time to finish (maybe a lot) but subsequent deploys will be faster.

Note

package.json contains the shuttle: scripts to interact with the shuttle.rs server. You can use them to login, deploy, start, restart, and stop the server.

Deploy via GitHub Actions

Cosidering the deploy limit per day, the deploy workflow is opt-in by default i.e. you need to manually trigger it by putting [deploy] anywhere in your commit message.

Important

To deploy using Github Actions, you need to specify the SHUTTLE_TOKEN in the repository secrets along with any other environment variable you are going to use in your project.
You can add or remove variables in .github/workflows/deploy.yml file.
This template requires the following environment variables to be set in the repository secrets:\

  • SHUTTLE_TOKEN: The token to authenticate with the shuttle.rs server.\
  • DISCORD_TOKEN: The discord bot token.
    Not specifying them in the repository secrets will result in a failed deployment.

Tip

To save your build hours, you may run the first deploy manually and then use the GitHub Actions to deploy the later changes.

Development

use general node workflow for development.

License

This project is licensed under the AGPL 3.0 License - see the LICENSE file for details

Author

Arnav Kumar (@arnav-kr)

node-shuttle's People

Contributors

arnav-kr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.