Last active
August 29, 2015 14:17
-
-
Save javierfernandes/ce5e2b4fc884b6a17dc2 to your computer and use it in GitHub Desktop.
PdeS -NodeJs - Hola Mundo
This file contains hidden or 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" : "pdes-nodejs-hola-mundo", | |
| "version" : "0.0.1", | |
| "main": "server.js", | |
| "dependencies" : { | |
| "express" : "~3.x" | |
| } | |
| } |
This file contains hidden or 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
| var express = require('express') | |
| var app = express() | |
| app.configure(function() { | |
| app.use(express.static(__dirname + '/public')); | |
| app.use(express.logger('dev')); | |
| app.use(express.bodyParser()); | |
| app.use(express.methodOverride()); | |
| }) | |
| app.listen(8080, function() { | |
| console.log('Aplicacion escuchando en el puerto 8080'); | |
| }) | |
| app.get('/hola', function(req, res) { | |
| res.send("Hola Mundo") | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment