GithubHelp home page GithubHelp logo

hhy5277 / matrix.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yooungt13/matrix.js

0.0 2.0 0.0 125 KB

a scaffold to build a big guy based on koa.

Shell 0.29% CSS 5.06% JavaScript 92.72% HTML 1.92%

matrix.js's Introduction

#Matrix.js

Travis npm Version npm

Nodejs scaffold based on Koa. You can transform it to be a matrix monster.

MMS

##Get Started

Requirements

  • Mac OS X, Windows, or Linux
  • Node.js v4.2.1 or newer
  • npm v3.9.6 or newer
  • PM2 v1.1.3 or newer

Directory Layout

Before you start, take a moment to see how the project structure looks like:

.
├── bin
│   ├── build.sh            deployment: build shell
│   └── run.sh              deployment: run shell
│
├── config
│   ├── defalut.js          default config
│   ├── dev.js              NODE_ENV: dev config
│   └── prod.js             NODE_ENV: prod config
│
├── client
│   ├── resource
│   │   ├── src
│   │   │   ├── js
│   │   │   └── scss
│   │   └── build
│   └── view
│       ├── cmp
│       │   ├── head.html
│       │   ├── header.html
│       │   └── footer.html
│       ├── layout
│       │   └── default.html
│       └── page
│           └── index.html
│
├── server
│   ├── recipe              framework startup rule
│   │   ├── template.js
│   │   ├── resource.js
│   │   ├── router.js
│   │   └── middleware.js
│   │
│   ├── model
│   │   ├── datasource      NODE_ENV: st/prod datasource
│   │   └── mock            NODE_ENV: dev     mock datasource
│   │
│   ├── controller
│   ├── middleware
│   ├── extension           extension tools
│   └── app.js              application script
│
├── log                     NODE_ENV: dev     logs
├── index.js                entry point
├── gulpfile.js             workflow script
├── pm2.json
└── package.json

Quick Start

1. Get the latest version

You can start by cloning the latest version of Matrix.js on your local machine by running:

$ git clone -o Matrix.js -b master --single-branch \
      https://github.com/yooungt13/Matrix.js.git MyApp
$ cd MyApp

Alternatively, you can start a new project based on Matrix.js right from Yeoman generator.

2. Run npm install

This will install both run-time project dependencies and developer tools listed in package.json file.

3. Run npm run dev

This command will start the Node.js server (node index.js with pm2) and gulp task for watching files change to reload.

http://localhost:3000/ — Node.js server
http://localhost:3000/ — Health check
http://localhost:3000/ — API Datasource

Note that the npm run dev commond launches the app in dev mode, the compiled output files are not optimized and minimized in this case. You can use prod argument to launch it in release (production) mode:

$ npm run prod

4. Run pm2 logs

This command will output the logs into terminal for checking, or you can check logs in the directory MyApp/log.

How to Update

If you need to keep your project up to date with the recent changes made to Matrix.js, you can always fetch and merge them from this repo back into your own project by running:

$ git checkout master
$ git fetch Matrix.js
$ git merge Matrix.js/master
$ npm install

matrix.js's People

Contributors

yooungt13 avatar

Watchers

haiyang 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.