How do you configure babel to run with different configurations in different environments

Set up different environments in your .babelrc { “env”: { “dev”: { “presets”: [“es2015”], “plugins”:[“x”] }, “test”: { “presets”: [“es2015”] } } } And then run babel after you have set your BABEL_ENV BABEL_ENV=test <commandhere> or BABEL_ENV=dev <commandhere> If you don’t set BABEL_ENV, babel will use the NODE_ENV value. If you don’t set either BABEL_ENV … Read more

How to await and return the result of a http.request(), so that multiple requests run serially?

async/await work with promises. They will only work if the async function your are awaiting returns a Promise. To solve your problem, you can either use a library like request-promise or return a promise from your doRequest function. Here is a solution using the latter. function doRequest(options) { return new Promise ((resolve, reject) => { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)