Hey Guys,
I’m creating a hook using the ACE example but I want to use my own URL not ngrok but I don’t know how to change it.
Any help?
regards,
Antonio
Hey Guys,
I’m creating a hook using the ACE example but I want to use my own URL not ngrok but I don’t know how to change it.
Any help?
regards,
Antonio
@AntonioMarques, welcome to the Atlassian developer community.
You will want to set some variables in ./config.json
:
"port": "443",
"localBaseUrl": "https://your-subdomain.example.com",
You might see these in 2 sections one for development
and another for production
. This corresponds to the NODE_ENV
environment variable, which defaults to development
.
Hey @ibuchanan, thanks for your answer, but this won’t solve the problem.
Let me explain a little bit what I’m doing. (I’m not a Node.js expert!)
I’m using the webhook template from Atlassian with some modifications um the routes folder and then this will run into a docker. I set these variables for development and production, but I got the same error if I used ports 443 or 80. Also, export NODE_ENV to test both.
Error: listen EACCES: permission denied 0.0.0.0:443
at Server.setupListenHandle [as _listen2] (net.js:1299:21)
at listenInCluster (net.js:1364:12)
at Server.listen (net.js:1450:7)
at Object.<anonymous> (/home/testarea/confluencehook/confluence-hook/app.js:94:24)
at Generator.next (<anonymous>)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1343:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:66:3)
at /home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:34535
at /home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:34176
at process.<anonymous> (/home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:34506)
at Function.<anonymous> (/home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:296856)
at Function.<anonymous> (/home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:296555)
at Function.<anonymous> (/home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:284879)
at Object.apply (/home/testarea/confluencehook/confluence-hook/node_modules/esm/esm.js:1:199341) {
code: 'EACCES',
errno: 'EACCES',
syscall: 'listen',
address: '0.0.0.0',
port: 443
}
config.json
{
"development": {
"port": "443",
"localBaseUrl": "https://cfhook.mydomain.com",
"errorTemplate": false,
"store": {
"adapter": "sequelize",
"dialect": "sqlite3",
"logging": false,
"type": "memory"
}
},
"production": {
"port": "443",
"errorTemplate": false,
"localBaseUrl": "https://cfhook.mydomain.com",
"store": {
"adapter": "sequelize",
"dialect": "sqlite3",
"logging": false,
"type": "memory"
},
"whitelist": [
"*.atlassian.net",
"*.atlassian.com"
]
},
"product": "confluence"
}
If I change the port for development to 8080 or 4443 I can run this.
Watching atlassian-connect.json for changes
App server running at http://MyHostname:8080
Local tunnel established at https://0x0x6fx5195.ngrok.io/
Check http://127.0.0.1:4040 for tunnel status
Registering add-on...
GET /atlassian-connect.json 200 3.732 ms - 792
Is there some reason to bind in local addr (127.0.0.1) or in all IPs (0.0.0.0) ?
Thanks for your time to help me.
Regards,