This node.js web server application parses the text messages sent by the user and converts predefined text with links. The predefined text and its replacement link are configurable for the app.
- node.js web server application for users to activate Circuit Linkify
- Circuit OAuth2 REST API to authenticate and authorize the user (Authorization Grant Flow)
- Circuit node.js SDK to logon on behalf of the user, subscribe to text messages and update text messages
Your post:
Updated by Circuit Linkify on your behalf:
git clone https://github.com/circuit/node-linkify.git
cd node-linkify
cp config.json.template config.json
Edit config.json
- Configure the circuit domain (e.g. circuitsandbox.net)
- Add OAuth2 settings (client_id, client_secret, scope)
- Configure the applications domain and port
- Configure the linkify regex
"circuit": {
"domain": "circuitsandbox.net",
"client_id": "<your client_id>",
"client_secret": "<your client_secret>",
"scope": "READ_USER_PROFILE,READ_CONVERSATIONS,WRTIE_CONVERSATIONS"
},
"app": {
"domain": "http://localhost",
"port": 7100,
"sdkLogLevel": "debug"
},
"linkify": [
{
"title": "Jira (ANS, AAC and CRI links)",
"id": "jira",
"search": "(ANS-[0-9]{1,5}|AAC-[0-9]{1,5}|CRI-[0-9]{1,5})",
"replace": "https://<your jira server>/browse/$1"
},
{
"title": "Gerrit (patch number)",
"id": "gerrit",
"search": "([4-6][0-9]{4})",
"replace": "https://<your gerrit server>/#/c/$1"
}
]
}
Run the sample application with
npm install
node index.js