Let’s create an astro app and deploy it to Runway.
Create the project:
$ npm create astro@latest
...
The tool will guide you through several questions — anything is possible. The key things to remember are to install the project in your desired location and allow it to initialize a Git repository. Everything else, like choosing between TypeScript or JavaScript and setting up strictness levels, is entirely up to you.
We’ll assume, you installed into my-app, so let’s change into the directory and add a node adapter to your project:
$ cd my-app
$ npx astro add node
...
This will configure the build process as well, and allow us to run the app standalone.
Create the app on Runway:
$ runway app create
INFO checking login status
INFO created app "unique-eclipse"
create app unique-eclipse: done
next steps:
* commit your changes
* runway app deploy
* runway open
By default, astro’s build process will be “standalone” (vs. astro as part of another app) and create the artifact in the dist/server directory. Our next step is to configure your app to use this file to start:
$ npm pkg set scripts.start="node ./dist/server/entry.mjs"
npm run build and npm run start. Your app will be build and boot, and be available at http://localhost:4321.By default, an astro app runs on port 4321 and is accessible only on localhost. To deploy with Runway, add the PORT and HOST settings to your app’s configuration:
$ runway app config set PORT=4321 HOST=0.0.0.0
INFO configuring app "unique-eclipse"
configure app unique-eclipse: done
Name Value
HOST 0.0.0.0
PORT 4321
git-commit your changes before you proceed!$ runway app deploy && runway open
Congratulations, young astronaut! You’re app is on Runway! 🧑🏼🚀👨🏾🚀