0.1.41 • Published 8 months ago

create-shuttle-app v0.1.41

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

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:

0.1.41

8 months ago

0.1.40

10 months ago

0.1.39

10 months ago

0.1.38

12 months ago

0.1.30

1 year ago

0.1.31

1 year ago

0.1.32

1 year ago

0.1.33

1 year ago

0.1.34

1 year ago

0.1.35

1 year ago

0.1.36

1 year ago

0.1.37

12 months ago

0.1.27

1 year ago

0.1.28

1 year ago

0.1.29

1 year ago

0.1.22

1 year ago

0.1.23

1 year ago

0.1.24

1 year ago

0.1.25

1 year ago

0.1.26

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.14

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago