Skip to content

Instantly share code, notes, and snippets.

Luan Rohde lrohde

Block or report user

Report or block lrohde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deviceInfo.js
DeviceInfo.getApplicationName().then(appName => {
// AwesomeApp
});
DeviceInfo.getBaseOs().then(baseOs => {
// "Windows", "Android" etc
});
DeviceInfo.getBatteryLevel().then(batteryLevel => {
// 0.759999
View .sequelizerc
const { resolve } = require('path');
module.exports = {
config: resolve(__dirname, 'src', 'config', 'database.js'),
'models-path': resolve(__dirname, 'src', 'app', 'models'),
'migrations-path': resolve(__dirname, 'src', 'database', 'migrations'),
'seeders-path': resolve(__dirname, 'src', 'database', 'seeds'),
};
View routes.js
import { Router } from 'express';
const routes = new Router();
routes.get('/', (req, res) => {
return res.json({ message: 'Hello World' });
});
export default routes;
View server.js
import app from './app';
app.listen(3333);
View app.js
import express from 'express';
import routes from './routes';
class App {
constructor() {
this.server = express();
this.middlewares();
this.routes();
View .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
View .prettierrc
{
"singleQuote": true,
"trailingComma": "es5"
}
View .eslintrc.js
module.exports = {
env: {
es6: true,
node: true,
},
extends: ['airbnb-base', 'prettier'],
plugins: ['prettier'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
View nodemon.json
{
"execMap": {
"js": "sucrase-node"
}
}
View vscode-config.json
{
"workbench.colorTheme": "Dracula",
"window.zoomLevel": 0,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.lineHeight": 24,
"editor.formatOnSave": true,
"eslint.validate": [
{
You can’t perform that action at this time.