资源算法ornito-express-api

ornito-express-api

2020-02-12 | |  35 |   0 |   0

OrnitoJS

Command line interface to start a new nodejs API based on express framework with Ornito structure defined from past projects.

  • async await functions

  • email builder using sendgrid service

  • jobs using cronjob

  • resources creation from command line

  • relational and non-relational databases

  • eslint

  • tests

  • convention over configuration

  • knex.js

Setup

Ornito JS allow you to easily start an API and code oriented to modules. strives to be an easily embeddable and beautiful command line interface for Node.js.

Ornito JS needs the following tools/techonologies to be able to start up.

  • Nodemon

  • Nodejs > 7.6.0

  • Postgres

  • Mongodb (if you're going to use it)

  • Redis (if you're going to use it)

Note: Ornito CLI is still in active development, we want to deliver more features like eslint, iugu integration and more.

Command line

npm install -g ornitojs
ornito start

Running

npm start
npm testnpm run linter

Creating a new module

ornito module user

Database configuration

➡️ ./knexfile.js

development: {
  client: 'postgresql',
  connection: {
    database: 'yourdb',
    user: 'youruser',
    password: 'yourpassword'
  },
  pool: {
    min: 2,
    max: 10
  },
  migrations: {
    tableName: 'migrations'
  },
  seeds: {
    directory: './seeds/dev/'
  }
},

➡️ ./src/config/ENV.json

{  "db_host": "postgres://youruser:yourpassword@localhost:5432/yourdb",  "sendgrid_api_key": "",  "iugu": {    "url": "https://api.iugu.com/v1/",    "api_key": "",    "api_token": ""
  },  "cloudinary": {    "cloud_name": "",    "api_key": "",    "api_secret": "",    "env_variable": ""
  }
}

上一篇:ornaments-thesis

下一篇:JSF-Video-Dersleri-Ornekleri

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...