1.3.16 • Published 8 years ago

generator-matrix v1.3.16

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

#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
1.3.16

8 years ago

1.3.15

8 years ago

1.3.14

8 years ago

1.3.13

8 years ago

1.3.12

8 years ago

1.3.11

8 years ago

1.3.10

8 years ago

1.3.9

8 years ago

1.3.8

8 years ago

1.3.7

8 years ago

1.3.6

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago