First Steps

In this set of articles, you'll learn the core fundamentals of JSBerry. You'll build a basic CRUD application which features covers a lot of ground at an introductory level.

Prerequisites

Please make sure that Node.js (>= 7.0.0) is installed on your operating system.

Language

We use pure JavaScript. JSBerry is taking advantage of latest language features, but to use a framework with simple JavaScript we don't need a Babel compiler. If some JSBerry feature not work - just update Node.js to the higher version.

Setup

Setting up a new project is quite simple with Starter repository. Just make sure that you have npm installed then use following commands in your OS terminal:

git clone https://github.com/Dugnist/jsberry project
cd project
npm i

Also, you can run this scripts to install default framework (express) starting modules:

npm run install-express

Then you need to editsrc/core/config/index.js andset key"framework"to your installed framework {express||koa} name.

You don't need any additional configurations.

Running application

Once the configuration process is completed, you can run the following command to start the HTTP server:

$ npm run start

This command starts the HTTP server on the port defined inside the framework config file. While the application is running, open your browser and navigate tohttp://localhost:8000/. You should see theHello world!message.


results matching ""

    No results matching ""