Giter Club home page Giter Club logo

node-builder's Introduction

PRs Welcome GitHub issues

Node-Builder

quickstart in node with express && ejs && mongodb

Feature

  • ES6
  • Hot-Reload

Root目录说明

  • src(项目源码)
  • config(webpack配置文件,开发环境,生产环境)
  • static(静态资源文件, css, js, lib)
  • views(ejs模版文件)
  • index.js(入口文件)
  • .eslintrc(代码规范配置)
  • .eslintignore(规范忽略配置)
  • .editorconfig(编辑器配置)
  • .gitignore(git忽略配置)
  • .babelrc(语法解析配置)

Src项目源码目录说明

文件夹统一使用小写

每个文件夹里面必须有一个index.js 作为导出文件,除了model有点例外

文件夹里面的文件都必须是大写的,除了index.js以外

目录名称 文件说明 备注
config.js 项目第三方的配置文件 存放的是mongodb,redis,或者是其他第三库的配置,一般都是帐号密码,地址,端口的配置
api API接口
common 工具类文件夹
dao 数据库相关的操作
getter 取回数据的格式化函数
logs 日志文件 只有在npm run dev 的时候才会生成,不会上传到git
middleware 个人定制化中间件函数库
model mongodb 数据的 collections结构(关系型数据库的开发者可以理解成表结构)
redis redis相关操作可以存放到里面 这个对于中大型项目需要用到的,如果小型项目觉得多余可以自行修改
schedule 定时任务 里面有简单的使用说明

Usage

<!-- 下载 -->
git clone https://github.com/Timson020/Node-Builder.git

<!-- 初始化项目 -->
npm run init

<!-- 本地运行开发环境 -->
npm run dev

<!-- 打包生产环境,注意只会打包node部分,static,views不会被打包 -->
npm run release

CMD

命令 描述
npm run init 初始化项目
npm run cleanNode 清除node_module,重新安装
npm run dev 开发环境
npm run release 打包生产环境
npm run release:performance 打包生产环境,并且查看具体性能

Contributors

小生不才!

欢迎各位大佬的PR

欢迎各位大佬的Issues

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.