This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Post('bomboo-webhook') | |
@Accessible() | |
async bombooWebhook( | |
@Req() request: RawBodyRequest<Request>, | |
@Res() response: Response | |
) { | |
const endpointSecret = this.configService.get('BOMBOO_WEBHOOK_SECRET'); | |
const signature = request.headers['x-bomboo-signature'] as string; | |
const { rawBody } = request | |
const isValidSignature = isValidHmacSignature(signature, rawBody, endpointSecret); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SSL certificates issuing | |
sudo openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 36500 -keyout /etc/ssl/main.key -out /etc/ssl/main.crt | |
# Nginx Conf | |
upstream backend { | |
server 127.0.0.1:3000; | |
keepalive 64; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"departements": [ | |
{ | |
"name": "ALIBORI", | |
"towns": [ | |
{ | |
"name": "SEGBANA", | |
"districts": [ | |
{ | |
"name": "LIBANTE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |