Skip to content

reactiverse/es4x

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

Signed-off-by: Paulo Lopes <pmlopes@gmail.com>
641810a

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
pm
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ES4X

This is the EcmaScript (5.1+) language support for Eclipse Vert.x

CI Join the chat at https://gitter.im/es4x/Lobby Security Status

Why?

10 things I've learned making the fastest JS runtime in the world

JavaScript is fast, and this is the way to make it even faster πŸš€πŸš€πŸš€

Usage

Create a project:

# create a generic project
mkdir my-app
cd my-app
# init the project
npm init @es4x project
# add other dependencies...
npm install @vertx/unit --save-dev
npm install @vertx/core --save-prod
# will trigger the download
# of the java dependencies
npm install

Create your index.js:

/// <reference types="es4x" />
// @ts-check

vertx
  .createHttpServer()
  .requestHandler(function (req) {
    req.response().end("Hello!");
  })
  .listen(8080);

console.log('Server listening at: http://localhost:8080/');

and your index.test.js:

import { TestSuite } from '@vertx/unit';

const suite = TestSuite.create("the_test_suite");

suite.test("my_test_case", function (context) {
  var s = "value";
  context.assertEquals("value", s);
});

suite.run();
npm start

Profit!

Documentation

For more documentation please see docs.