You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2020. It is now read-only.
This will start both the API and the Admin in the same terminal.
You can also start the two components separately:
Start the API
npm run dev:api
Start the Admin
npm run dev:admin
Clean up the project
During development it can be useful to bring the project back to a clean state. To do this run:
npm run clean && npm install && lerna bootstrap
Configuring the development setup
local.yaml
You can configure the API in development mode by creating a local.yaml file in config. The contents of this
file is not tracked by git so it only lives on your local machine.
To start with the default settings copy config/default.yaml to config/local.yaml.
Sample data
The API comes with a set of sample data for development.
To load the sample data when starting the API update local.yaml to include:
system:
initdb: true
You can also use the INITDB environment variable.
API Base Url
By default the development stack assumes that the API and Admin are both started on localhost (using 127.0.0.1).
In order to run the API on another host than localhost the admin needs to know on which IP address it can reach the API.
To do this you need to update the api.baseUrl config property.
Make sure to configure the API Base Url without a trailing slash.
To set the API Base Url update local.yaml to include:
api:
# Do not use trailing spaces for the baseUrlbaseUrl: https://192.168.12.34:3000
You can also use the API_BASE_URL environment variable.
You should now be able to connect to the Admin on https://192.168.12.34:9000 and it should connect to the API.
Development Servers
Colmena comes with a Docker Compose configuration for running development servers easily.
mongodb
To use the mongodb server update local.yaml to include:
mongodb:
url: mongodb://localhost/colmena
You can also use the MONGODB_URL environment variable
mailhog
To use the mailhog server update local.yaml to include:
smtp:
host: localhostport: 1025
You can also use the SMTP_HOST and SMTP_PORT environment variables
Start the servers
npm run servers # or: npm run servers:start
Show the servers logging
npm run servers:logs
Stop the servers
npm run servers:stop
Delete the servers
npm run servers:rm
Contributors
Thanks goes to these wonderful people (emoji key):