0.11.1 • Published 5 years ago

evaengine v0.11.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

EvaEngine For NodeJS

NPM version Build Status Dependencies Status codecov npm License

A micro service development engine for NodeJS.

  • Full DI support (Injected by ES7 decorators as well)
  • ES7 async & await support
  • CLI mode support (easily convert to schedules)
  • Better exceptions design
  • ORM support (Based on Sequelize)
  • Quick test by mocking request & response
  • Builtin cache layer
  • Builtin session / token authentications
  • Http client with fully debugging log
  • Distributed tracing log support (Zipkin compatible)
  • API document generator

Quick Start

Clone this skeleton project to quick start:

EvaSkeleton.js

Run as web server

import { EvaEngine } from 'evaengine';

const engine = new EvaEngine({
  projectRoot: `${__dirname}/..`,
  port: 3000
});

engine.bootstrap();
engine.use('/', (req, res) => {
  res.json({ hello: 'world' });
});
engine.run();

Then visit http://localhost:3000 to view API.

Run as CLI

import { EvaEngine } from 'evaengine';
import * as UserCommands from './commands/user';
const engine = new EvaEngine({
  projectRoot: `${__dirname}/..`
}, 'cli');
engine.registerCommands(UserCommands);
(async() => {
    await engine.runCLI();
})();

Run as Cron Job

import { EvaEngine } from 'evaengine';
import * as HelloWorldCommands from './commands/hello_world';

const engine = new EvaEngine({
  projectRoot: `${__dirname}/..`
}, 'cli');
engine.registerCommands([
  HelloWorldCommands
]);

engine.runCrontab('0/10 * * * * *', 'hello:world --id=EvaEngine');

Swagger Support

Process as follow:

  • ES7 Files =(Babel)=>
  • ES5 Files =(acorn)=>
  • AST =(filter)=>
  • Annotations =(doctrine)=>
  • JsDocs =(convert)=>
  • Fragments + EvaEngine Exceptions + Sequelize Models =(Merge & Compile)=>
  • Swagger Specification JSON File

Debug with Projects

cd EvaNode
npm link
cd your_project
npm link evaengine

Global Environment Variables

  • NODE_ENV
  • PORT
  • LOG_LEVEL
  • CLI_NAME
  • MAX_REQUEST_DEBUG_BODY
  • SEQUELIZE_REPLICATION_CONFIG_KEY : change sequelize replication config key

Generate Entities

./node_modules/.bin/engine make:entity
./node_modules/.bin/engine make:dbview

Import eslint with airbnb code standard for Webstorm

WebStorm > Preferences > Editor > Code Style > JavaScript > Scheme > Import Scheme > Choose airbnb_code_style.xml under this project

0.11.1

5 years ago

0.11.0

6 years ago

0.10.0

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.9

6 years ago

0.5.8

6 years ago

0.5.7

6 years ago

0.5.5

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.4.6

6 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.2.15

7 years ago

0.2.14

7 years ago

0.2.13

7 years ago

0.2.12

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.36

7 years ago

0.1.35

7 years ago

0.1.34

7 years ago

0.1.33

7 years ago

0.1.32

7 years ago

0.1.31

7 years ago

0.1.30

7 years ago

0.1.29

7 years ago

0.1.28

7 years ago

0.1.27

7 years ago

0.1.26

7 years ago

0.1.25

8 years ago

0.1.24

8 years ago

0.1.23

8 years ago

0.1.22

8 years ago

0.1.21

8 years ago

0.1.20

8 years ago

0.1.19

8 years ago

0.1.18

8 years ago

0.1.17

8 years ago

0.1.16

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago