Giter Site home page Giter Site logo

treasureling / express-gulp-browsersync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kisnows/express-gulp-browsersync

0.0 2.0 0.0 3.62 MB

Home Page: https://www.kisnows.com/2015/11/02/dev-environment-Express-Gulp-BrowserSync/

License: MIT License

JavaScript 62.27% CSS 32.10% HTML 5.64%

express-gulp-browsersync's Introduction

Express+BrowserSync+nodemon

使用(Use)

npm install

开发(dev)

npm run dev

Express 会被 BrowserSync 代理到 5000 端口,同时提供本地 mock 功能, mock 数据存放在 data/data.js 里面,简单粗暴,就是一个 JSON 对象。当然也可以在 server 的 data/index.js 里面自定义更加详细的数据返回。

联调(dev api)

npm run api

在上一个命令的基础上,把 mock 数据由本地换为实际服务器地址,可以在 config.js 下面配置

module.exports = {
  'port': 3000,
  'remoteApi': '10.240.96.129:3008'   //服务器地址
}

构建(dist)

npm run dist

打包压缩后的文件会存放在 public 文件夹下。

Browser to localhost:5000 ,go dev!

express-gulp-browsersync's People

Contributors

kisnows avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.