Created
July 10, 2015 14:08
-
-
Save pmlopes/e7ec5d0d2499577d1512 to your computer and use it in GitHub Desktop.
vert.x3 for javascript developers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "vertx3-hello", | |
"private": true, | |
"dependencies": { | |
"vertx3-min": "3.0.0-1" | |
}, | |
"scripts": { | |
"start": "./node_modules/.bin/vertx run server.js" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vertx.createHttpServer() | |
.requestHandler(function (req) { | |
req.response() | |
.putHeader("content-type", "text/plain") | |
.end("Hello from Vert.x!"); | |
}).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run you code:
npm start