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
app.get('/users/:id', (req, res) => { | |
const userId = req.params.id | |
if (!userId) { | |
return res.sendStatus(400).json({ | |
error: 'Missing id' | |
}) | |
} | |
Users.get(userId, (err, user) => { | |
if (err) { | |
return res.sendStatus(500).json(err) |
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
{ | |
"extends": ["airbnb", "prettier", "prettier/react"], | |
"plugins": ["prettier"], | |
"rules": { | |
"react/jsx-filename-extension": [ | |
1, | |
{ | |
"extensions": [".js", ".jsx"] | |
} | |
], |
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
{ | |
"singleQuote": true | |
} |
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
{ | |
"files.autoSave": "onFocusChange", | |
"editor.formatOnSave": true, | |
"editor.formatOnType": true, | |
"eslint.autoFixOnSave": true, | |
"eslint.enable": true, | |
"prettier.singleQuote": true, | |
} |
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
const { app, BrowserWindow } = require('electron'); | |
const path = require('path'); | |
const url = require('url'); | |
require('dotenv').config(); | |
let win = null; | |
function createWindow() { | |
// Initialize the window to our specified dimensions |