Git Product home page Git Product logo

lowjs-typescript-setup's Introduction

Lowjs with typescript setup

Setup

Install required packages

    npm install

Create .env file and define 'PORT'

PORT = 8080

Usage

Server's source code is located in the src folder. File src/intex.ts is used as the main entry.

To build the production file (ES5, as is required by lowjs), use either one of these commands npm run build , npm run build:watch. When option with the :watch in the end of the command is used, production file is going to be generated on every detected save.

Generated file will be located in the dist folder and will be named server.js.

Tests

A valid test file needs to include .test.ts in its name.

To perform all of the tests located under src folder, run npm run test. The test engine will automatically detect all of the test files and execute them all at once.

Reducing production node modules

There is an npm package called modclean used to reduce node_modules size, by deleting the unused files/folders.

    npm i --save modclean

Add clean script to package json, run:

    npm run clean

After the node_modules have been cleaned, uninstall modclean with:

    npm uninstall modclean

Lowjs Environment using Docker

To create docker container with lowjs installed, execute following commands:

    docker run --name lowjs -p 127.0.0.1:80:8080/tcp -it ubuntu
    $  apt update
    $  apt install -y curl git make g++ automake autoconf libtool cmake python2 nano
    $  curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
    $  python2 get-pip.py
    $  pip install pyyaml
    $  apt install -y python
    $  curl -sL https://deb.nodesource.com/setup_14.x | bash
    $  apt install -y nodejs
    $  git clone --recurse-submodules https://github.com/neonious/lowjs
    $  cd lowjs
    $  make

Lowjs will be installend under /lowjs/bin/low

lowjs-typescript-setup's People

Watchers

James Cloos avatar Mateusz Groth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.