0.5.9 • Published 6 years ago

hails v0.5.9

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

hails

hapi based web stack with sequelize, kuejs, etc.

  • from 0.4.0, added supports for hapi17

npm version

get started

mkdir my-project
cd $_
yarn add hails
mkdir -p src/core

# settings.js
echo "module.exports = {
  development: {
    context: './src',
    modules: [
      'core',
    ],
  },
}" > settings.js

# src/core/api.js
echo "export default () => [{
  method: 'GET',
  path: '/',
  handler(request) {
    return 'hello world'
  },
}]" > src/core/api.js

# that's all, run a server.
yarn hails run
# open http://localhost:3000

sample code

git clone https://github.com/eseom/hails-sample <project name>
cd <project name>
yarn
yarn dev

feature

  • essential hapi plugins
  • module system like django
  • sequelize integrated
  • kue integrated

default options

export default {
  context: undefined,
  vesion: undefined,
  server: {
    host: 'localhost',
    port: 3000,
  },
  logger: {
    level: 'silly',
  },
  modules: [],
  useSequelize: false,
  viewEngine: {
    type: 'nunjucks',
  },
  scheduler: {
    enable: false,
  },
  swagger: {
    info: {
      title: 'API Documentation',
    },
    grouping: 'tags',
  },
  yar: {
    engine: {
      type: 'memory',
    },
    cookieOptions: {
      password: 'the-password-must-be-at-least-32-characters-long',
      isSecure: false,
    },
  },
}

development

yarn
yarn watch

api

  • (TODO)
0.5.9

6 years ago

0.5.8

6 years ago

0.5.7

6 years ago

0.5.6

6 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.17

6 years ago

0.3.16

6 years ago

0.3.15

6 years ago

0.3.14

6 years ago

0.3.13

6 years ago

0.3.12

6 years ago

0.3.11

6 years ago

0.3.10

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 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.3.0

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

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago