Creating A Website With Kado

Posted: Apr 19, 2019 by BRamey

Kado is the complete development environment based on node.js. It provides a modular environment to create applications that provide the flexibility needed to create any application you can imagine.

Creating a website with Kado is fast and easy!

First, a couple prerequisites are required. In order to use Kado, MySQL (5.7 or later) and Node.js (8.0 or later) must both be available to the system.

Node.js installation can be found here

MySQL installation can be found here

Next, we need to install kado.This can be done globally using the following command in the command prompt:

#  npm i -g kado

Next, we must create an application folder. After the folder is created, we will navigate the command prompt into this folder. This can be done using the following command in the command prompt:

#  mkdir projects\kado-example
#  cd projects\kado-example

Next, we need to install kado into a package.json.This can be done using the following command in the command prompt:

#  npm --init

The entry point should be

#  entry point: (index.js) app.js

A good test command is

#  test command: node ./app.js test

After answering the questions from npm --init, a package.json will be generated and Kado can be installed.

Next, we need to install kado.This can be done using the following command in the command prompt:

#  npm install kado --save

Next, we need to create an app.js file and preconfigure our database access. This can be done using the following command in the command prompt:

#  node ./node_modules/kado/.app.js kado bootstrap --app Example --dbuser example --dbpassword example

Now, our new website application is ready to run complete with an app.js, package.json, and kado installed. To run our application, use the following command in the command prompt:

#  node app

Expected result:

#  [2019-04-19T22:40:01.520Z 18664-KADO] INFO: Starting admin
#  [2019-04-19T22:40:05.836Z 18664-KADO] INFO: Starting main
#  [2019-04-19T22:40:07.971Z 18664-KADO] INFO: EXAMPLE started!

Our application should now be available on http://localhost:300 for the admin panel and http://localhost:3001 for the website (main).

This example can be found at https://github.com/bramey/kado-example

For the next steps, please visit the Kado docs at https://kado.org/doc/kado/3.x/getting-started