jimk-osu / ballerina-www

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ballerina.io (ballerina-www)

Setting up the development environment

Prerequisites

Building

  1. git clone https://github.com/ballerina-platform/ballerina-www.git
  2. git submodule update --init --recursive
  3. mvn clean install

Running

Once build is completed, you can find the generated www folder at <repo-root>/website/target/webroot/. If you already have a running HTTP server, copy the webroot folder there and point the browser to it.

Else, since you already have NodeJs installed, install serve - a simple webserver on NodeJs.

  1. To install, execute npm i -g serve.
  2. To start the server, execute cd website/target/webroot && serve.

Note:- This is just a simple HTTP server and will not hot deploy changes. In order to apply the changes you do, you need to run mvn install to build.

This will start a webserver with <repo-root>/website/target/webroot/ path set as the webroot and by default can be consumed via http://localhost:5000.

To start the playground widget in development server separately

After following below steps, webpack will host playground widget at http://localhost:3000 and changes done to source files will be hot deployed.

  1. cd playground-widget/ballerina/composer/modules/web && npm install (we need this ATM as babel tries to load babel plugins from ballerina/composer/modules/web/node_modules for js files from composer)

  2. cd playground-widget && npm run start

License

This source is license under the Apache License, Version 2.0 (LICENSE), You may not use this file except in compliance with the License.

About

License:Apache License 2.0


Languages

Language:HTML 88.5%Language:CSS 4.6%Language:JavaScript 4.2%Language:Java 1.4%Language:Go 0.6%Language:Ballerina 0.3%Language:Shell 0.2%Language:Dockerfile 0.1%Language:Python 0.1%Language:Ruby 0.0%Language:Makefile 0.0%Language:PHP 0.0%Language:Jupyter Notebook 0.0%