Synchronize your backlogapp with trello.
First ensure that the configuration is right for your needs. You can override all values by setting the corresponding ENV variables. All following values in config.js
need to be set:
{
env: {
doc: 'The applicaton environment.',
format: ['production', 'development', 'test'],
default: 'development',
env: 'NODE_ENV'
},
key: {
doc: 'Trello API key',
format: val => {
if (!/^[a-fA-F0-9]{32}$/.test(val)) {
throw new Error('must be a 32 character hex key')
}
},
default: null,
env: 'API_KEY'
},
secret: {
doc: 'Trello API OAuth secret',
format: val => {
if (!/^[a-fA-F0-9]{64}$/.test(val)) {
throw new Error('must be a 64 character hex key')
}
},
default: null,
env: 'API_SECRET'
},
ip: {
doc: 'The IP address to bind.',
format: 'ipaddress',
default: '127.0.0.1',
env: 'IP_ADDRESS',
},
port: {
doc: 'The port to bind.',
format: 'port',
default: 4001,
env: 'PORT'
},
dbUrl: {
doc: 'The URI of the Backlog MongoDB.',
format: 'url',
default: 'localhost:27017',
env: 'DB_URL'
}
}
key
and secret
have no default values on purpose. Please use your own. You can get both here.
If you agree with all settings, start the server with:
API_KEY="<trello-api-key>" API_SECRET="<trello-api-secret>" npm start
If you want to automatically have the server restarted while developing, you would want to let nodemon watch your changes. You can do this by running:
DB_ULR="<url-to-backlog-db>" npm run dev
You can find the Backlog DB URL by running meteor mongo
.
⚠ Important ⚠
Each request needs to be a POST request and have the keys token
and secret
in the payload. These are the token and secret you get once you authorized this microservice against the Trello OAuth mechanism. While running the server in development mode, you can do this by going to http://localhost:4001/login.
Endpoint: POST /list-boards
Required:
token
secret
Endpoint: POST /list-lists
Required:
token
secret
boardId
: the id of the board for which to get the lists
Endpoint: POST /create-board
Required:
token
secret
name
: the name of the board
Endpoint: POST /create-list
Required:
token
secret
name
: the name of the listboardId
: the id of the board to create the list in
Endpoint: POST /synchronize
Required:
token
secret
backlogId
listId