---
config:
gantt:
fontSize: 30
barHeight: 140
---
gantt
title Demo request then parallel request
axisFormat %Ss
The MIT License (MIT) Copyright (c) 2019-2020 Hugo Di Francesco
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
There's a package.json
+ lockfile missing, you probably want to use netlify-lambda (npm i --save netlify-lambda
) to bundle your code.
Dependencies you need for the code to work:
When using a custom Next.js server there are many ways for environment variables to make it into the application:
- server-side outside of Next (using dotenv)
- server-side with Next (at build time)
- server-side with Next (at run time)
- client-side with Next (at build time)
- client-side with Next (at run time)
For build time variables:
- server-side: access using process.env (dotenv or Next will likely pick it up)
{ | |
"name": "express-pug-scss-starter", | |
"version": "1.0.0", | |
"description": "Express server rendered app with Pug and SCSS", | |
"main": "server.js", | |
"config": { | |
"app": "server.js", | |
"scss": "./src/scss", | |
"css": "./dist/css", | |
"img_src": "./src/img/", |
{ | |
"editor.quickSuggestions": { | |
"other": false, | |
"comments": false, | |
"strings": false | |
}, | |
"editor.parameterHints.enabled": false | |
} |
const delimiterRegEx = /(_\w)/g; | |
export function convertSnakeToCamelCase (str) { | |
return str.replace(delimiterRegEx, ([delimiter, firstChar]) => | |
firstChar.toUpperCase() | |
); | |
} | |
export const convertKeysToCamelCase = obj => | |
Object.entries(obj).reduce((prev, [key, value]) => { | |
if (value && typeof value === 'object') { |
function reduce([ head, ...tail ], fn, initial) { | |
if(head === undefined && tail.length === 0) return initial; | |
if(!initial) { | |
const [ newHead, ...newTail] = tail; | |
return reduce(newTail, fn, fn(head, newHead)); | |
} | |
return tail.length ? reduce(tail, fn, fn(initial, head)) : [ fn(initial, head) ]; | |
} |