Documentation
Project Setup

Project Setup

takes 5 minutes to complete

💡

This guide is also available in video form on the GovTech YouTube channel (opens in a new tab).

Set up your Project

Get started using an existing repository, or start from a NextJS template.

Using a NextJS Hello World Template

Here's a Hello World (opens in a new tab) app to get you started. (preview (opens in a new tab))

Set up your project folder and install all your dependencies:

git clone https://github.com/GovTechSG/template-nextjs-helloworld.git
cd template-nextjs-helloworld
npm install

You can also check out our featured templates.

Configure your project for Airbase

Start by running airbase configure to create the configuration file.

airbase configure

Follow the wizard to configure the project. Use the default values if you're using NextJS.

Configuring project for Airbase
? Project Name: my-project
? Framework: nextjs-standalone
? Build command: npm run build
? Command to start production server: node server.js
 
 {
   name: "my-project"
    "framework": "nextjs-standalone",
    "scripts": {
      "build": "npm run build",
      "start": "node server.js"
    },
 }
 
? Save configuration? Yes
 
Configuration saved in ./airbase.json

After providing the project name and start command, the wizard will save your changes in ./airbase.json for later.

Link your project to Airbase

Before the first deployment, you need to select which project to deploy on Airbase.

Run airbase link in your project folder to connect it to an Airbase project.

airbase link

Develop and Build your App

With a template (based on NextJS), development can begin right away!

Use your favourite Integrated Development Environment (IDE), or start with just one command:

npm run dev

Once you're ready to deploy your application, read on.

What's Next?

Ready for your app to take flight? Read on to learn how to deploy your app to Airbase.