Skip to content

Instantly share code, notes, and snippets.

View vadym1930's full-sized avatar
🏄

Vadym Horbonos vadym1930

🏄
View GitHub Profile
var express = require('express');
var router = express.Router();
/* GET food listing. */
router.get('/', function(req, res, next) {
res.send('Are you hungry');
});
module.exports = router;
@learncodeacademy
learncodeacademy / webpack.config.js
Created January 8, 2016 03:55
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@ecarter
ecarter / mapOrder.js
Created December 2, 2011 15:40
Order an array of objects based on another array order
/**
* Sort array of objects based on another array
*/
function mapOrder (array, order, key) {
array.sort( function (a, b) {
var A = a[key], B = b[key];