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
# ########################################################## | |
# Stuff related to docker development | |
# ########################################################## | |
docker-compose.* | |
# ########################################################## | |
# Application related stuff | |
# ########################################################## |
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
{ | |
/* | |
Installed extensions: | |
- File Utils | |
- Github Plus Theme | |
- Git Lens | |
- php-cs-fixer | |
- PHP Intelephense | |
- snippet-creator |
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
<?php | |
$finder = PhpCsFixer\Finder::create() | |
->exclude([ | |
'tests', | |
'storage', | |
'node_modules', | |
'vendor', | |
]) | |
->in(__DIR__) |
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
var mongoose = require('mongoose'); | |
var repository = function (modelName) { | |
var self = this; | |
self.Model = require('../models/' + modelName); | |
self.FindById = function (id, cb) { | |
self.FindOne({ |
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 express = require('express'); // exporting the createApplication() in lib/express.js that returns a function which returns a function which has attached extra properties | |
const app = express(); //this also returns a function with some extra properties attached | |
const port = process.env.PORT || 3000; // in production server I will set the env variable PORT so it wont be 3000 | |
app.get('/hello', (req, res) => { | |
res.send('Hello world'); // or I can send a JSON file res.json({firstname: 'John', lastname: 'Doe'}) | |
}); //if a request comes in and url =xxx and verb is GET call the callback and passes an express request and response which are node's req and res on steroids | |
/** |