Browse Source

node server

master
guy 8 years ago
parent
commit
e0dcacec44
  1. 12
      index.html
  2. 11
      package.json
  3. 13
      server.js

12
index.html

@ -5,14 +5,14 @@
<title></title>
<link rel="stylesheet" type="text/css"
href="dist/core.css"/>
href="./dist/core.css"/>
<link rel="stylesheet" type="text/css"
href="dist/base.css"/>
href="./dist/base.css"/>
<script src="dist/core.js"></script>
<script src="dist/base.js"></script>
<script src="dist/case.js"></script>
<script src="index.js"></script>
<script src="./dist/core.js"></script>
<script src="./dist/base.js"></script>
<script src="./dist/case.js"></script>
<script src="./index.js"></script>
</head>
<body>
<div id="wrapper"></div>

11
package.json

@ -3,19 +3,20 @@
"version": "1.0.0",
"description": "fineui",
"main": "index.js",
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"express": "^4.15.2",
"grunt": "^1.0.1",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-cssmin": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-uglify": "^1.0.1",
"grunt-contrib-watch": "^1.0.0"
"grunt-contrib-watch": "^1.0.0",
"open": "0.0.5"
},
"scripts": {
"grunt": "grunt"
"grunt": "grunt",
"start": "node server.js"
},
"author": "",
"license": "MIT"

13
server.js

@ -0,0 +1,13 @@
/*eslint no-console:0 */
'use strict';
const express = require('express');
const open = require('open');
const fs=require("fs");
const app = express();
const port = 3000;
app.use(express.static("./"));
app.listen(port, function() {
console.log("server start");
open('http://localhost:' + port + '/index.html');
});
Loading…
Cancel
Save