Vert. x Development Guide

Source: Internet
Author: User
ArticleDirectory
    • 1. Operating System
    • 2. JDK
    • 3. jruby (optional)
Vert. x Development Guide

Author: chszs, reprinted with note. Blog homepage: http://blog.csdn.net/chszs
I. Introduction

Vert. X is an asynchronous application.ProgramThe development framework can be used to develop asynchronous, scalable, and highly concurrent web applications. The purpose is to provide a node. js alternative solution for JVM. Developers can use JavaScript, Ruby, groovy, Java, or even hybrid languages to write applications.
Using the vertx. x framework, you can use JavaScript, coffeescript, Ruby, Python, groovy, or Java to develop application components. The final application can be built in a hybrid language.

Ii. Conditions of Use 1. Operating System

Vertx. x supports Linux, OSX, and Windows operating systems.
2. JDK

Vertx. X requires JDK 7 or later. You can select Oracle JDK or openjdk.
3. jruby (optional)

If you want to use Ruby to develop applications with vertx. X, you need to install jruby and set the jruby_home environment variable.
Second, you also need to install JSON Ruby gem, because vertx. X will use it. Run:
Jruby-s gem install JSON

Note: This article uses the Ubuntu 13.04 operating system.

Iii. Download and install

The latest stable version is version 1.3.1, version 2.0, or beta2.
Http://vert-x.github.io/vertx-downloads/downloads/vert.x-1.3.1.final.tar.gz

$ Sudo tar zvxf vert.x-1.3.1.final.tar.gz
$ CD Vert. x-1.3.1.final/bin
$./Vertx version
Vert. x-1.3.1.final

Set Environment Variables

$ Export Path = $ path:/home/chszsg/vertx/bin

Iv. Test

Create a file named server. js with the following content:

 
// Server. jsload ('vertx. js'); vertx. createhttpserver (). requesthandler (function (req) {Req. response. End ("Hello vertx! ");}). Listen (8080, 'localhost ');

Run the following command in the shell environment:
$ Vertx run server. js
Enter the address: http: // localhost: 8080/in the browser/
The result is as follows:

Verify that vert. X works properly!

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.