0.1.41 • Published 2 months ago

create-shuttle-app v0.1.41

Weekly downloads
-
License
-
Repository
-
Last release
2 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

2 months ago

0.1.40

4 months ago

0.1.39

4 months ago

0.1.38

5 months ago

0.1.30

7 months ago

0.1.31

7 months ago

0.1.32

7 months ago

0.1.33

7 months ago

0.1.34

6 months ago

0.1.35

6 months ago

0.1.36

6 months ago

0.1.37

6 months ago

0.1.27

8 months ago

0.1.28

8 months ago

0.1.29

8 months ago

0.1.22

10 months ago

0.1.23

9 months ago

0.1.24

9 months ago

0.1.25

9 months ago

0.1.26

9 months ago

0.1.21

10 months ago

0.1.20

11 months ago

0.1.19

11 months ago

0.1.17

12 months ago

0.1.18

11 months ago

0.1.15

1 year ago

0.1.16

1 year ago

0.1.14

1 year ago

0.1.10

1 year ago

0.1.11

1 year ago

0.1.12

1 year ago

0.1.13

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago