______________________________________
< ... I have read the INSTRUCTIONS ... >
--------------------------------------
\ ,__,
\ (oo)____
(__) )\
||--|| *
- Lua
5.1
- Luarocks for Lua
5.1
- Openrestify
1.7.4.1
make global
make build
make migrate
make run
- Proxy:
http://localhost:8000/
- API:
http://localhost:8001/
- Proxy:
Commands consist of apenode's scripts and Makefile:
Name | Description |
---|---|
global |
Install the apenode luarock globally |
build |
Generates an apenode environment (nginx + apenode configurations) in a given folder (see DIR ) |
migrate |
Migrate your database according to the given apenode config (see APENODE_CONF ) |
reset |
Reset your database schema according to the given apenode config (see APENODE_CONF ) |
seed |
Seed your database according to the given apenode config |
drop |
Drop your database according to the given apenode config |
run |
Runs the given apenode environment in a given folder (see DIR ) |
stop |
Stops the given apenode environment in a given folder (see DIR ) |
test |
Runs the unit tests |
test-proxy |
Runs the proxy integration tests |
test-web |
Runs the web integration tests |
test-all |
Runs all unit + integration tests at once |
Name | Default | Commands | Description |
---|---|---|---|
DIR |
tmp/ |
`build | run |
APENODE_CONF |
tmp/apenode.conf |
`build | migrate |
DAEMON |
off |
build |
Sets the nginx daemon property in the generated nginx.conf |
APENODE_PORT |
8000 |
build |
Sets the apenode proxy port in the generated nginx.conf |
APENODE_WEB_PORT |
8001 |
build |
Sets the apenode web port in the generated nginx.conf |
LUA_CODE_CACHE |
off |
build |
Sets the nginx lua_code_cache property in the generated nginx.conf |
LUA_LIB |
$(PWD)/src/?.lua;; |
build |
Sets the nginx lua_package_path property in the generated nginx.conf |
Name | Commands | Description | Arguments |
---|---|---|---|
migrate |
|||
create --conf=[conf] |
Create a migration file for all available databases in the given conf | --name=[name] Name of the migration |
|
migrate --conf=[conf] |
Migrate the database set in the given conf | ||
rollback --conf=[conf] |
Rollback to the latest executed migration (TODO) | ||
reset --conf=[conf] |
Rollback all migrations | ||
seed |
|||
seed --conf=[conf] |
Seed the database configured in the given conf | -s (Optional) No output |
|
-r (Optional) Also populate random data (1000 by default) |
|||
drop --conf=[conf] |
Drop the database configured in the given conf | -s (Optional) No output |
The Apenode provides APIs to interact with the underlying data model and create APIs, accounts and applications
POST /apis/
- required
public_dns
: The public DNS of the API - required
target_url
: The target URL - required
authentication_type
: The authentication to enable on the API, can bequery
,header
,basic
. - required
authentication_key_names
: A comma-separated list of authentication parameter names, likeapikey
orx-mashape-key
.
POST /accounts/
provider_id
: A custom id to be set in the account entity
POST /applications/
- required
account_id
: Theaccount_id
that the application belongs to. public_key
: The public key, or username if Basic Authentication is enabled.- required
secret_key
: The secret key, or api key, or password if Basic authentication is enabled. Use only this fields for simple api keys.