Creating your application

Our examples

We have 2 example projects you can start with.

Demo V1

Demo V1

--example demo-v1

This example will work straight out of the box. It's connected to our example Magento 2 store and wordpress blog.

Demo V2

Demo V2

--example demo-v2

This is our most feature rich example. It requires a BigCommerce, Stripe and Algolia account to get started.

View Demo

Create Falcon App

To generate a new application based on Falcon Platform you can use our CLI tool, create falcon app.

Using the new theme?

By default the demo based on "demo-v2" assumes it's connected to a BigCommerce instance, which uses Algolia and Stripe. Without these credentials the application will not start (you'll see the errors in the console). The old theme will, by default, be connected to our demo Magento 2 and Wordpress instances.

npx @deity/create-falcon-app <project-name>

This will generate a Falcon site into a directory with the name of your projects (<project-name>).

Regular Project

project-name/
|- client

Enterprise / Full Project

project-name/
|- client
|- server

Options

  • --example <name-of-example> The example flag is used to define which example we want to start with. The options are demo-v1(default) and demo-v2. demo-v1 by default connects to a demo Magento 2 and Wordpress instance. To use the latest demo use demo-v2. This requires you to have your own BigCommerce, Algolia and Stripe accounts.
npx @deity/create-falcon-app --example demo-v2 <project-name>
  • --full To generate Falcon Server use the --full flag. You will only be able to deploy Falcon Server changes if you're on an Enterprise plan.
npx @deity/create-falcon-app --full <project-name>

Configuring Falcon Client

Running Falcon Server Locally?

If you're an Enterprise customer and running Falcon Server locally you can skip this step and connect to Falcon Server using the default settings.

Before you can start your app you'll need to configure Falcon Client to point to Falcon Server.

1. Create a local.json file

Create a local.json file in your client/config/ direcotry. This file is ignored by git and should not be committed.

2. Add your details.

Add the following code to your local.json file, replacing [YOUR_SITE_URL] with your site URL.

{
"graphqlUrl": "[YOUR_SITE_URL]/graphql",
}

Starting your app

Sandbox / Production customers

To get your app started you'll need to start (and keep running) Falcon Client.

In a terminal window go into the client directory (cd client/) and run the start command.

Client

cd client/
npm start

Once these have started, visit http://localhost:3000 to see your app.

Enterprise customers

If you're on an Enterprise plan and have access to Falcon Server you may also want to run this locally.

By default Falcon Server runs on http://localhost:4000 and uses http://localhost:4000/graphql for it's graphQl endpoint.

As well as having Falcon Client running you'll need to open a new terminal window and run the start command in the server directory.

Server

cd server/
npm start

Ask the community. #help

If you can't find what you're looking for, the answer might be on our community slack channel. Our team keep a close eye on this and will usually get back to you within a few hours, if not straight away. If you haven't created an account yet please sign up here slack.deity.io.