Faable Docs
Search…
Project Config
To serve your app from Faable check that the following is true.

Start script

Make sure your app has a start script inside package.json
1
{
2
"name": "app_name",
3
"scripts": {
4
"start": "<your start script here>"
5
}
6
}
Copied!

Serve your app at $PORT

Start a server that listens on 0.0.0.0 and serves http traffic using environment variable PORT to configure its port binding. This variable will be automatically configured in Faable Cloud when routing requests to your app.
1
const express = require("express");
2
const app = express();
3
4
// NOTE: To work on Faable Cloud, use the $PORT environment variable
5
const port = process.env.PORT;
6
7
app.get("/", (req, res) => {
8
res.send("Hello World!");
9
});
10
11
app.listen("0.0.0.0", port, () => {
12
console.log(`Example app listening on port ${port}`);
13
});
Copied!