Last active
September 17, 2015 07:12
-
-
Save wegorich/f6f70fa8c9a7fdb3c114 to your computer and use it in GitHub Desktop.
Crap coding best practise
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
| process.env.NODE_ENV = process.env.NODE_ENV || 'development'; | |
| var logger = require("./server/components/logger"); | |
| /// | |
| // Set default node environment to development | |
| var express = require('express'); | |
| var mongoose = require('mongoose'); | |
| var config = require('./server/config/environment'); | |
| var fs = require('fs'), | |
| path = require('path'); | |
| // Connect to database | |
| mongoose.connect(config.mongo.uri, config.mongo.options); | |
| mongoose.set('debug', true); | |
| // PLACE FOR NEW CRAPPING | |
| // | |
| // | |
| //...............,´¯`, | |
| //.........,´¯`,..../ | |
| //....../¯/.../..../ | |
| //..../../.../..../..,-----, | |
| //../../.../....//´...........`. | |
| //./../.../..../......../´¯\....\ | |
| //('.('..('....('.......|.....'._.' | |
| //.\....................`\.../´...) | |
| //...\.....................V...../ | |
| //.....\........................./ | |
| //.......`•...................•´ | |
| //..........|.................| | |
| //........▓▒▒▒▒▒▒▒▓ | |
| //........▓▒▒▒▒▒▒▒▓ | |
| // RUN ALL PIECE OF CRAPS | |
| // | |
| // | |
| var _craps = fs.readdirSync('./crap_test').map(function(i){ | |
| return require('./crap_test/' + i); | |
| }); | |
| async.each(_craps, function(item, callback){ | |
| item(logger); | |
| callback(); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment