Sometimes, plain HTML (with a touch of CSS) is all you need. Runway lets you build applications without forcing you into a specific framework.
For this guide, we’ll create an empty Git repository containing a public
folder and an index.html
file to serve as your website.
This setup can be achieved with a series of commands that:
public
folder and add an index.html
file$ mkdir static-website
$ cd static-website
$ git init
Initialized empty Git repository in /Users/name/static-website/.git/
$ mkdir public/
$ echo 'My website' > public/index.html
With the structure created, you need to commit your changes:
$ git add -A && git commit -m "Initial commit: my website"
The only step left is to tell Runway that you need a web server — let’s use Nginx:
runway app config set BP_WEB_SERVER=nginx
[build]
[[build.env]]
name = "BP_WEB_SERVER"
value = "nginx"
By setting BP_WEB_SERVER
, the build pack will generate a web server configuration for you. This configuration works for almost all situations, but of course you can customize it further.
You can also choose the Apache HTTP Server by setting BP_WEB_SERVER=httpd
. For more details, check out our web server documentation.
Create an application on Runway:
$ runway app create
INFO checking login status
INFO created app "static-champion"
create app static-champion: done
next steps:
* commit your changes
* runway app deploy
* runway open
And deploy:
$ runway app deploy && runway open