Javascript

This document describes Developing UI in Javascript using Trillo Workbench. It is similar to developing UI for against any application server using restful API.

Introduction

This document outlines the process of constructing a user interface (UI) using Trillo Workbench APIs, following similar procedures as with any other server. It provides guidance on creating UI elements through examples using CURL commands (referencing a Postman collection) and includes snippets of JavaScript code for implementation.

Prerequisites

  • Node.js: Ensure you have Node.js installed. You can download it from nodejs.org.

  • Git: Make sure Git is installed on your system. You can download it from git-scm.com.

  • SSH-KEY: Make sure you've configured your SSH key for GitHub by following the setup instructions available on git-scm.com.

Clone the Repository

  • First, navigate to your repository on GitHub or your preferred platform.

  • Copy the SSH link for your repository.

  • Open your terminal on your local machine.

  • Use the following command to clone the repository

  • Command (SSH): git clone git@github.com:trilloapps/javascript-guide.git

Setting Up the Project

Run the Application

  • Open the integrated terminal in Visual Studio Code. You can do this by selecting View > Terminal or by pressing Ctrl + ` (backtick).

  • Use the cd command to navigate to the directory where your JavaScript project is located.

    • For example: cd path/to/your/project

  • Install http-server globally (only needed once)

    • npm install -g http-server

  • If it encounters issues due to permission restrictions, attempt the following.

    • sudo npm install -g http-server

  • Start the server in the current directory

    • Http-server

This will start a server, and it will provide you with a URL (usually http://localhost:8080). Open this URL in your web browser.

Last updated