To start deploying with Linc, the first step is to create a Linc site.
This will take you to the Site Creator page where can select where your project source code is hosted:
GitHub - If your project is hosted on GitHub and you'd like Linc to build your project automatically on every code push, select the GitHub option.
Other - If your project is hosted somewhere else, see our guide on Using External CI with Linc.
If you selected the GitHub option, then the next step is to Select a Repository from the list of available repositories.
If this is your first time using Linc, you may need to connect your GitHub repository to Linc by clicking the Connect repository button:
Once you've connected your desired repositories to Linc, the repository list should be populated with one or more repositories:
Once you've selected your repository, you can then proceed to the Configure step.
To configure your site, enter a short and unique site name, then make sure the pre-filled path to your repository package.json is correct:
If things look good, go ahead and hit the Next button to move onto the final (and optional) step Production Releases:
Here in the Production Releases step, you can optionally setup automatic deployment of your app to the following edge hosting providers:
- Cloudflare Workers - see our Cloudflare Workers documentation
- Lambda@Edge - see our Lambda@Edge documentation
Alternatively, you can skip this section entirely by simply selecting an option of None.
NOTE: Production releases can be configured at any time from your Site settings. You can always do this step later if you prefer.
Once you're done, click the Create Site button. Your new site will be created and you will be automatically redirected to your new Site Overview:
After a few seconds, Linc will automatically attempt to build the last few commits on your main branch.
Once the commits finish building, each build will produce a bundle that will be deployed to unique preview URL accessible from the preview column of your Recent Commits section:
When building your commits, Linc attempts to compile your application into a Frontend Application Bundle, or FAB for short.
FABs are a build target, taking the form of a special special zip file containing a complete snapshot of your application: all your server-side code, all your client-side assets. Linc's preview and deployment infrastructure is built on top of the FAB specification.
If your project isn't configured to compile to the FAB build target, don't worry, Linc automatically runs the FAB auto-configure utility on each of your commits like so:
npx fab init -y
This ensures that all your builds are compiled to the FAB specification and can be deployed by Linc's preview and deployment infrastructure.
While it is possible to use Linc without any prior config, we strongly recommend that you configure your project by running the following command in your project directory:
npx fab init
This will download and run the FAB auto-configure utility in your project directory. The utility will then attempt to detect your project type and install the FAB packages required to compile your project source code to the FAB format:
The auto-configure utility will also add a configuration file called fab.config.json5 where you can customise and fine-tune how your FABs are compiled.
Finally, three new scripts will be added to your project package.json:
"build:fab": "npm run build && npm run fab:build",
"fab:build": "fab build",
"fab:serve": "fab serve fab.zip",
These scripts can be used to build and serve FABs from the command line, and, if present, are what Linc uses to compile your project to a FAB.
Once your project has been configured to compile to the FAB format, commit and push your changes. Linc will use the FAB configuration present in your project for subsequent builds.
With that, you're now up and running on Linc!
Where to from here?
Now that your site is up and running, check out some of our guides below to learn about some of the really cool stuff you can do:
Using run-time environments to inject variables into your app at run-time.
How to integrate with Slack to automatically dispatch preview URLs to Slack channels of your choice.