Commit cfa9f075 authored by Moises Sacal's avatar Moises Sacal
Browse files

updated readme

parent 903a839d
......@@ -72,3 +72,60 @@ $ npm test
```
For more information on testing your hook go to : https://sailsjs.com/documentation/concepts/testing
## Development in redbox-portal
There are several ways to code against the redbox-portal. One of it is to link the code via `npm link`
*npm link this hook*
```bash
cd /into/where/hook/is/
npm link
```
npm link into redbox-portal
```bash
cd /into/redbox-portal/
npm link sails-hook-redbox-gitlab
```
## Vagrant/Docker
Using docker while running redbox-portal is a posibility
In the `docker-compose.yml` file in redbox-portal verify that the service has the volume.
```yml
- "/opt/hooks:/opt/hooks"
```
For Vagrant to place the code inside of the same machine/docker. You can share it via the VagrantFile using sync_folder
```yml
config.vm.synced_folder "/Users/moises/source/qcif/sails-hook-redbox-template", "/opt/hooks/sails-hook-redbox-template", id: "template"
```
Now inside the docker instance of redbox-portal link the hook and your redbox-portal
```bash
docker exec -it redbox-portal_redboxportal_1 /bin/bash
```
run npm link in the hook folder
```bash
cd /opt/hooks/sails-hook-redbox-template
npm link
```
now link this alias in your redbox-portal
```bash
cd /opt/redbox-portal
npm link sails-hook-redbox-template
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment