-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds the CLI and tweaks a few things to make it work altogether. concerns #12
- Loading branch information
Showing
59 changed files
with
8,933 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
Copyright © 2017 Nicolas Froidure | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the “Software”), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[//]: # ( ) | ||
[//]: # (This file is automatically generated by a `metapak`) | ||
[//]: # (module. Do not change it except between the) | ||
[//]: # (`content:start/end` flags, your changes would) | ||
[//]: # (be overridden.) | ||
[//]: # ( ) | ||
# create-whook | ||
> Create a basic Whook server | ||
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/create-whook/blob/master/LICENSE) | ||
[![NPM version](https://badge.fury.io/js/create-whook.svg)](https://npmjs.org/package/create-whook) | ||
[![Dependency Status](https://david-dm.org/nfroidure/create-whook.svg)](https://david-dm.org/nfroidure/create-whook) | ||
[![devDependency Status](https://david-dm.org/nfroidure/create-whook/dev-status.svg)](https://david-dm.org/nfroidure/create-whook#info=devDependencies) | ||
[![Package Quality](http://npm.packagequality.com/shield/create-whook.svg)](http://packagequality.com/#?package=create-whook) | ||
|
||
|
||
[//]: # (::contents:start) | ||
|
||
[//]: # ( ) | ||
[//]: # (This file is automatically generated by a `metapak`) | ||
[//]: # (module. Do not change it except between the) | ||
[//]: # (`content:start/end` flags, your changes would) | ||
[//]: # (be overridden.) | ||
[//]: # ( ) | ||
# create-whook | ||
> Create a basic Whook server | ||
[![NPM version](https://badge.fury.io/js/create-whook.svg)](https://npmjs.org/package/create-whook) | ||
[![Dependency Status](https://david-dm.org/nfroidure/create-whook.svg)](https://david-dm.org/nfroidure/create-whook) | ||
[![devDependency Status](https://david-dm.org/nfroidure/create-whook/dev-status.svg)](https://david-dm.org/nfroidure/create-whook#info=devDependencies) | ||
[![Dependency Status](https://dependencyci.com/github/nfroidure/create-whook/badge)](https://dependencyci.com/github/nfroidure/create-whook) | ||
[![Package Quality](http://npm.packagequality.com/shield/create-whook.svg)](http://packagequality.com/#?package=create-whook) | ||
|
||
|
||
[//]: # (::contents:start) | ||
|
||
|
||
[//]: # (::contents:end) | ||
|
||
# Authors | ||
- [Nicolas Froidure](http://insertafter.com/en/index.html) | ||
|
||
# License | ||
[MIT](https://github.com/nfroidure/create-whook/blob/master/LICENSE) | ||
|
||
|
||
[//]: # (::contents:end) | ||
|
||
# Authors | ||
- [Nicolas Froidure](http://insertafter.com/en/index.html) | ||
|
||
# License | ||
[MIT](https://github.com/nfroidure/create-whook/blob/master/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { runServer } from '../src/index'; | ||
|
||
runServer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { runServer } = require('../dist/index'); | ||
|
||
runServer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import packageConf from '../../package'; | ||
|
||
const DEBUG_NODE_ENVS = ['development', 'preproduction', 'test']; | ||
const NODE_ENVS = [...DEBUG_NODE_ENVS, 'production']; | ||
|
||
const CONFIG = { | ||
BASE_ENV: {}, | ||
CONFIG: { | ||
basePath: '/v1', | ||
schemes: ['http'], | ||
version: packageConf.version, | ||
name: packageConf.name, | ||
description: packageConf.description || '', | ||
}, | ||
NODE_ENVS, | ||
DEBUG_NODE_ENVS: process.env.DEBUG ? NODE_ENVS : DEBUG_NODE_ENVS, | ||
CORS: { | ||
'Access-Control-Allow-Origin': '*', | ||
'Access-Control-Allow-Methods': 'GET,POST,PUT,DELETE,OPTIONS', | ||
'Access-Control-Allow-Headers': [ | ||
'Accept', | ||
'Accept-Encoding', | ||
'Accept-Language', | ||
'Referrer', | ||
'Content-Type', | ||
'Content-Encoding', | ||
'Authorization', | ||
'Keep-Alive', | ||
'User-Agent', | ||
].join(','), | ||
Vary: 'Origin', | ||
}, | ||
}; | ||
|
||
export default CONFIG; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import COMMON_CONFIG from '../common/config'; | ||
|
||
const CONFIG = { | ||
...COMMON_CONFIG, | ||
}; | ||
|
||
export default CONFIG; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import COMMON_CONFIG from '../common/config'; | ||
|
||
const CONFIG = { | ||
...COMMON_CONFIG, | ||
}; | ||
|
||
export default CONFIG; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import COMMON_CONFIG from '../common/config'; | ||
|
||
const CONFIG = { | ||
...COMMON_CONFIG, | ||
}; | ||
|
||
export default CONFIG; |
Oops, something went wrong.