Skip to content

A short test for Foxx-Builder driven API, OpenResty running in Docker

License

Notifications You must be signed in to change notification settings

skitsanos/foxx-nginx-chai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foxx-nginx-chai

Short test for Foxx-Builder driven API, OpenResty running in Docker

Start docker containers

Assuming you have Docker installed already

docker compose up

Preparing the database

Once docker containers are up and running, login on http://loclhost:9999 and use root as username and openSesame as password.

  • Create new user called demo with password demo
  • Create new database demo with user demo

Now you can continue with installing Foxx Microservices on your database.

Install Foxx CLI

yarn global add foxx-cli

Or with npm:

npm install --global foxx-cli

Install dependencies required to run local tests

yarn

Register Foxx Microservices dev server

foxx server set docker-demo http://demo:demo@localhost:9999

or

foxx server set docker-demo http://demo:demo@localhost:9999

Install APIs

The package.json already contains some of the scripts to simplify your tasks

yarn run install-foxx-dev

or

foxx install /api ./api --server docker-demo --database demo

Updating Foxx Microservices APIs

foxx replace /api ./api --server docker-demo --database demo

or

foxx replace /api ./api --server docker-demo --database demo

Running tests

yarn test