Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skitsanos/foxx-nginx-chai

A short test for Foxx-Builder driven API, OpenResty running in Docker
https://github.com/skitsanos/foxx-nginx-chai

arangodb backendless docker docker-compose foxx-builder mocha mocha-chai nginx openresty

Last synced: about 10 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

# foxx-nginx-chai
Short test for Foxx-Builder driven API, OpenResty running in Docker

### Start docker containers
Assuming you have Docker installed already

```shell
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

```shell
yarn global add foxx-cli
```

Or with npm:

```shell
npm install --global foxx-cli
```

### Install dependencies required to run local tests

```shell
yarn
```

### Register Foxx Microservices dev server

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

or

```shell
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

```shell
yarn run install-foxx-dev
```

or

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

### Updating Foxx Microservices APIs

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

or

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

## Running tests

```shell
yarn test
```