Skip to main content
Version: 3.0

Installation

This page will help you install and build your first Orionjs project. If you already have Orionjs installed, you can skip this page.

Requirements

  • Node: 14 (LTS)

Installing Orionjs CLI

Assuming that you have Node installed, you can use yarn to install the orion command line utility:

npm install -g @orion-js/core

Using a starter kit

Now that you have the orion command you can download a starter kit.

Available kits:

  • typescript-starter: Contains a basic Orionjs TypeScript starter project.
  • graphql-starter: Contains a basic Orionjs GraphQL server.
  • http-starter: Contains a basic Orionjs HTTP server.

Let's example start with the typescript-starter kit. This will create a new project with a already set up TypeScript starter project with GraphQL & HTTP server:

orion create --kit typescript-starter --name myproject

This will create a folder called myproject, in the directory where you ran the command

Alternative

Alternatively, to install the TypeScript starter project with Git:

git clone https://github.com/siturra/boilerplate-orionjs-typescript-starter.git myproject

Hint: When cloning the repository, it will be cloned with the history in .git

Install dependencies from starter kit's

cd myproject
npm install

Running the server

The starter kit comes with a .env.example file which you will need to rename to .env, this file can receive environment variables and the start command.

.env
PORT=3000
VARIABLE_1="example"

Run

Run the following command to start the server locally

orion start

Open your browser and navigate to http://localhost:3000