This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

create-shuttle-app

0.1.41 • Public • Published

create-shuttle-app

The create-shuttle-app node CLI is a utility designed to make deploying a next.js web-app with a Rust backend easier. The CLI will initialize a create-next-app project and export it to a static directory in a rust webserver project based on the axum web framework. The rust server will serve the next.js app in the static directory, and it can easily be extended with API-routes.

The rust server also uses shuttle. Shuttle uses annotations to deploy a webserver written in rust to the cloud, and it can also provision databases like Postgres and MongoDB via annotations.

For more information on shuttle check out our website: https://www.shuttle.rs/

This is the first iteration of this CLI so you may encounter some issues at first. Feel free to report this to us on github, or reach out to us on Discord

Usage

To install and run the latest version of the create-shuttle-app CLI, run this command:

npx create-shuttle-app

The command also takes some optional args:

--ts                               # Initialize the Next.js app as a typescript project.
--eslint                           # Initialize with eslint config.
-e, --example [name]|[github-url]  # An example to bootstrap the app with. You can use an example name
                                    from the official Next.js repo or a GitHub URL. The URL can use
                                    any branch and/or subdirectory
--shuttle-example <github-url>     # A GitHub URL to use to bootstrap the shuttle backend with.
--fullstack-example                # Initialise using a provided full-stack Shuttle template (current supported values: "saas")

Commands

After initializing your app, you're ready to deploy it or run it locally.

To deploy your application to the cloud, you need to run the following commands:

First, login: npm run shuttle-login

Start your project container: npm run start

And that's it! When you're ready to deploy: npm run deploy

If you'd like to develop locally, you can start a next.js dev server as well as your shuttle backend with the npm run dev

If you wish to stop your deployment: npm run stop

Contributing

If you're looking to contribute, you can quickly test any changes you've made by running the following:

yarn build
yarn copy-assets
node dist/index.js 

This builds a local release of the package, copies the required assets to be able to run it locally and then runs it locally.

Windows troubleshooting

create-shuttle-app will install Rust and the cargo-shuttle crate with install scripts. It will try to do this automatically, but it may fail, and you might want to do this yourself. The install scripts may also cause PowerShell to not be able to run create-shuttle-app, since it disallows scripts by default. To override this, run the set-executionpolicy remotesigned command in a PowerShell started in administrator mode. Or use Git Bash, which doesn't restrict this.

If you want to install dependencies for create-shuttle-app manually, these are the required native dependencies:

Readme

Keywords

none

Package Sidebar

Install

npm i create-shuttle-app

Weekly Downloads

8

Version

0.1.41

License

none

Unpacked Size

5.68 MB

Total Files

67

Last publish

Collaborators

  • iulianbarbu2
  • oddgrd