Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eseom/hails
simple backend webstack with hapi, sequelize, kuejs
https://github.com/eseom/hails
hapi kuejs sequelize
Last synced: 3 days ago
JSON representation
simple backend webstack with hapi, sequelize, kuejs
- Host: GitHub
- URL: https://github.com/eseom/hails
- Owner: eseom
- Created: 2017-04-23T05:54:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-20T01:04:38.000Z (almost 7 years ago)
- Last Synced: 2024-10-16T02:02:53.634Z (2 months ago)
- Topics: hapi, kuejs, sequelize
- Language: TypeScript
- Homepage:
- Size: 192 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## hails
hapi based web stack with sequelize, kuejs, etc.
- from 0.4.0, added supports for hapi17
[![npm version][npm-badge]][npm-url]
## get started
```bash
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
cd
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)[npm-url]: https://www.npmjs.com/package/hails
[npm-badge]: https://img.shields.io/npm/v/hails.svg