Last active
August 29, 2015 13:56
-
-
Save atian25/9047610 to your computer and use it in GitHub Desktop.
grunt-express issue
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
D:\Workspace\Code\test\test-grunt | |
λ grunt server | |
Running "express:server" (express) task | |
Running "parallel:express_server_server" (parallel) task | |
Running "express-watch-livereload:D:\Workspace\Code\test\test-grunt\src:server:35729" (express-watch-livereload | |
) task | |
Running "watch:express_\Workspace\Code\test\test-grunt\src_livereload" (watch) task | |
Waiting...Running "express-watch-server:server:C:\Users\TZ\AppData\Local\Temp\express114117-5204-9jy3hk\server. | |
server" (express-watch-server) task | |
Running "watch:express_server_server" (watch) task | |
Waiting...OK | |
Running "express-server:server:C" (express-server) task | |
Web server started on port:9000, no hostname specified [pid: 8176] | |
Running "express-keepalive" task |
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
module.exports = function (grunt) { | |
'use strict'; | |
grunt.loadNpmTasks('grunt-express'); | |
grunt.initConfig({ | |
express: { | |
options: { | |
port: 9000, | |
hostname: '*' | |
}, | |
server: { | |
livereload: true, | |
options: { | |
serverreload: true, | |
livereload: 35729, | |
bases: ['./src'], | |
//bases: ['src'] | |
} | |
} | |
} | |
}); | |
grunt.registerTask('server', ['express', 'express-keepalive']); | |
} |
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
<html> | |
<head> | |
</head> | |
<body> | |
<!-- at src/index.html --> | |
testaaaaa!!!! | |
</body> | |
</html> |
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
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": "test-grunt", | |
"description": "", | |
"main": "index.js", | |
"devDependencies": { | |
"grunt": "~0.4.2", | |
"grunt-express": "~1.2.1" | |
} | |
} |
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
D:\Workspace\Code\test\test-grunt | |
λ npm list | |
test-grunt@ D:\Workspace\Code\test\test-grunt | |
├─┬ test-grunt | |
│ ├─┬ src | |
│ │ └── index.html | |
│ ├── package.json | |
│ ├─┬ Gruntfile.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
<html> | |
<head> | |
</head> | |
<body> | |
<!-- at src/index.html --> | |
testaaaaa!!!! | |
<!-- livereload script --> | |
<script type="text/javascript">document.write('<script src="http://' | |
+ (location.host || 'localhost').split(':')[0] | |
+ ':35729/livereload.js?snipver=1" type="text/javascript"><\/script>') | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment