This file contains hidden or 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
| function browser_routes({ | |
| app, | |
| auth_config, | |
| app_type, | |
| store, | |
| options, | |
| middleware, | |
| }) { | |
| app.post(options.auth_url, middleware, (req, res) => { | |
| res.send('foo'); |
This file contains hidden or 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
| JWT_SECRET=dev secret |
This file contains hidden or 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
| JWT_SECRET=super secret foo | |
| DB_PASS=best db pass |
This file contains hidden or 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
| SOME_VAR= | |
| SOME_OTHER_VAR= |
This file contains hidden or 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
| const start = performance.now(); | |
| Array.from({ length: 10000000 }, () => undefined); | |
| const end = performance.now(); | |
| console.log({ performance: end - start }); |
This file contains hidden or 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
| 'use strict'; | |
| const path = require('path'); | |
| const cwd = path.resolve(__dirname); | |
| const ecosystem_config = { | |
| apps: [ | |
| { | |
| name: 'foo app', |
This file contains hidden or 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
| const fn = (x) => new Promise((resolve, reject) => { | |
| if (x === 0) { | |
| reject(new Error('Error: equals 0')); | |
| } else { | |
| resolve(`Resolved: ${x}`); | |
| } | |
| }); | |
| const ps = [ | |
| fn(1), |
This file contains hidden or 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
| function connect(address) { | |
| return new Promise((resolve, reject) => { | |
| const server = new WebSocket(address); | |
| server.onopen = () => { | |
| resolve(server); | |
| }; | |
| server.onerror = (e) => { | |
| reject(e); | |
| }; | |
| }); |
This file contains hidden or 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
| const errors = []; | |
| const ress = []; | |
| const fn = (x) => new Promise((resolve) => { | |
| if (x === 0) { | |
| errors.push('Equals 0'); | |
| // reject(new Error('Error: equals 0')); | |
| } else { | |
| // resolve(`Resolved: ${x}`); | |
| ress.push(`Equals ${x}`); |
This file contains hidden or 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
| const foo = 0; | |
| const a = {}; | |
| const b = { | |
| ...a, | |
| ...(foo === 0 ? { a: 'a' } : { b: 'b' }), | |
| }; |
NewerOlder