Short test for Foxx-Builder driven API, OpenResty running in Docker
Assuming you have Docker installed already
docker compose up
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 passworddemo
- Create new database
demo
with userdemo
Now you can continue with installing Foxx Microservices on your database.
yarn global add foxx-cli
Or with npm:
npm install --global foxx-cli
yarn
foxx server set docker-demo http://demo:demo@localhost:9999
or
foxx server set docker-demo http://demo:demo@localhost:9999
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
foxx replace /api ./api --server docker-demo --database demo
or
foxx replace /api ./api --server docker-demo --database demo
yarn test