-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jesus Mur
committed
Oct 30, 2014
0 parents
commit d338cb2
Showing
5 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var express = require('express'); | ||
var app = module.exports = express(); | ||
|
||
var morgan = require('morgan'); | ||
var swig = require('swig'); | ||
|
||
app.engine('html', swig.renderFile); | ||
|
||
app.set('view engine', 'html'); | ||
app.set('views', __dirname + '/views'); | ||
|
||
|
||
app.use(morgan('dev')); | ||
|
||
app.get('/', function (req, res) { | ||
res.render('index', {message: 'hola mundo'}); | ||
}); | ||
|
||
var port = 3000; | ||
app.listen(port, function (err) { | ||
if (err) { | ||
console.log('Error del servidor ' + err); | ||
} else { | ||
console.log('servidor corriendo en el puerto ' + port); | ||
}; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var gulp = require('gulp'); | ||
var nodemon = require('gulp-nodemon'); | ||
|
||
gulp.task('default', function() { | ||
console.log('Tarea de prueba'); | ||
}); | ||
|
||
gulp.task('develop', function () { | ||
nodemon({ script: 'app.js', ext: 'html js', ignore: [] }) | ||
.on('change', []) | ||
.on('restart', function () { | ||
console.log('restarted!') | ||
}); | ||
}); | ||
|
||
gulp.task('default',['develop']); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "ngusers", | ||
"version": "1.0.0", | ||
"description": "Angular learning", | ||
"main": "app.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Jesús Mur Fontanals", | ||
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.10.1", | ||
"morgan": "^1.4.1", | ||
"swig": "^1.4.2" | ||
}, | ||
"devDependencies": { | ||
"gulp": "^3.8.9", | ||
"gulp-nodemon": "^1.0.4" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Ng-Users</title> | ||
</head> | ||
<body> | ||
<h1>{{message}}</h1> | ||
</body> | ||
</html> |