Create and Deploy a Preact App with ZEIT Now

Create your Preact app and deploy it with ZEIT Now.

Preact is a fast 3kB alternative to React with the same modern API.

In this guide, we will cover how to set up a Preact app with Preact CLI and how to deploy it with ZEIT Now.

Step 1: Set Up Your Preact Project

If you do not have the Preact CLI installed currently, use the following command to install it globally:

npm i -g preact-cli

Installing Preact CLI globally with npm.

Get started by setting up a Preact app with Preact CLI and the following command:

preact create default my-preact-app && cd my-preact-app

Bootstrapping a Preact app with Preact CLI.

Step 2: Deploying Your Preact Project with ZEIT Now

With your project set up, you are ready to deploy your Preact app with ZEIT Now.

If you have not yet installed Now, you can do so by installing Now CLI.

You can now deploy your Preact app with a single command:

now

Deploying the app with the now command.

If you want to deploy your Preact project from a Git repository, you can use either Now for GitHub or Now for GitLab to have your project automatically deployed on every push, and the production domain updated on push to master.



Written By
Written by msweeneydevmsweeneydev
on August 16th 2019