Giter Site home page Giter Site logo

credit's Introduction

creditchain

配置开发环境

安装express开发工具

sudo npm install express-generator -g

检查有无安装成功

express --help

进入自己的目录,创建websample

cd ~
mkdir websample

使用 ejs 模板库,创建一个名为 creditchain 的项目,并且不使用 CSS样式表引擎。

cd websample
express credit --view=ejs

安装依赖包

cd credit && npm install
npm install --save body-parser
npm install --save serve-favicon

让服务器在文件更改时,自动重新启动

npm install --save-dev nodemon

修改package.json 的脚本 scripts 区块,找到以"start"开头的代码段,在该行的末尾添加逗号,然后,添加"devstart" 开头的一行

"scripts": {
"start": "node ./bin/www",
"devstart": "nodemon ./bin/www"
},

启动服务器

DEBUG=credit:* npm run devstart

现在,如果编辑项目中的任何文件,服务器自动重新启动。刷新浏览器,就能看到程序的调试结果。

下载源码到本地进行调试

git clone https://github.com/wan-yong/credit.git
cd credit

备注

http://www.cnblogs.com/best/p/6204116.html#_label0
https://www.bilibili.com/video/av17977069/
https://developer.mozilla.org/zh-CN/docs/Learn/Server-side/Express_Nodejs/routes

credit's People

Contributors

wan-yong avatar

Watchers

James Cloos 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.