You can configure a repository to build a FAB by running
npx fab init in the repo:
npx fab init
The following frameworks are supported:
- Create React App
- NextJS 9+
Anything else will be treated as a "static" build i.e. a project with no server-side component. It'll look for a command like
npm run build to generate a directory like
public, which should cover everything from Angular to Vue to Gatsby. But as always, leave an issue if something you think should happen doesn't happen.
fab init will add
fab:build scripts to your
package.json, but both of them call
fab build under the hood.
# runs npm run build, then builds the FAB yarn build:fab npm run build:fab # alias for fab build, below yarn fab:build npm run fab:build # generates a FAB according to your fab.config.json5 fab build
If it works, you should get a
fab.zip file output.
fab serve fab.zip fab serve fab.zip --port=3001
Runs your FAB in a local NodeJS Express server.
Will prompt you for your Cloudflare workers & Amazon S3 info and deploy your FAB!