⚒️How to initialize project

In this part, it is documented how to initialize the project.

Build Setup

Now that you have downloaded and unzipped the project, you should have seen that there are 2 folders, the Backend folder and the Frontend folder. In this tutorial, we will teach you how to configure the backend.

# Go to paste
$ cd backend

# Create your .env file using .env.example as an example

# Create your api_key
$ node ace generate:key

# install dependencies
$ npm install

# Create database structure
$ node ace migration:run

# Create account admin and character sample
$ node ace db:seed

# server with changes watcher
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

Create your .env file

In the .env file, this is where you will leave your environment settings, such as your database username/password. Create your .env file using .env.example as an example.

It will come like this:

Configure your credentials. Example of the configured file:

Install dependencies using NPM

npm install

Create database structure

Now we will run the command to insert in our database the tables that ElectroAAC needs to work. Don't worry, it will create everything automatically, just run the following command:

# Create database structure
node ace migration:run

# Create account admin and character sample
$ node ace db:seed

Run project DEV

Running in development mode allows you to monitor everything that is happening.

npm run dev

Build for production and launch server

As ElectroAAC uses Typescript, to apply the production mode, we must compile our project. Use the following commands:

npm run build
npm run start

Last updated