Ringojs JVM-based JavaScript platform trial

Source: Internet
Author: User

Ringojs is a JVM-based JavaScript platform that supports COMMONJS module mode

Installation

Download the package configuration environment variable, or use Docker to test using Docker

    • Dockerfile

      Deb Package Installation

FROM java:8MAINTAINER [email protected]RUN apt-get update && apt-get install -y jsvcADD ringojs_1.2.1_all.deb /tmp/ringojs.debRUN dpkg -i /tmp/ringojs.deb && rm /tmp/ringojs.debCMD ["bash"]
    • Use

      I built the base image Dalongrong/ringojs-docker

Dockerfile:FROM dalongrong/ringojs-dockerWORKDIR /appCOPY app.js /app/ENTRYPOINT [ "ringo","app.js" ]app.js:var app = function(request) {return {body: [‘Hello World‘],headers: {‘Content-Type‘: ‘text/html‘},status: 200}}var {Server} = require(‘ringo/httpserver‘);var server = new Server({app: app, port: 8080,host:"0.0.0.0"});server.start();docker-compose.yaml:version: "3"services:  app:    image: dalongrong/ringojs-app-demo    build: ./    ports:    - "8080:8080"
Run
docker-compose up -d
Access

Description
从使用还是比较简单的, 同时内置的模块已经够用常用的开发了,同时官方有集成spring 等框架的,类似vertx 比这个更加强大,生态相对来说比这个好很多
Resources

https://ringojs.org/
Https://github.com/rongfengliang/ringojs-docker

Ringojs JVM-based JavaScript platform trial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.