id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watc...
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
35a0b8de50b9da7a00a8fe75ad066276ad8f54a6
1,168
https://github.com/linemanjs/lineman/blob/35a0b8de50b9da7a00a8fe75ad066276ad8f54a6/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
server = http.createServer(app) userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) configureLiveReloadMiddleware(app) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(ap...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
35a0b8de50b9da7a00a8fe75ad066276ad8f54a6
1,168
https://github.com/linemanjs/lineman/blob/35a0b8de50b9da7a00a8fe75ad066276ad8f54a6/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a0da0e670ba96c4245308357a2a89c74411c7106
1,168
https://github.com/linemanjs/lineman/blob/a0da0e670ba96c4245308357a2a89c74411c7106/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.r...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("f...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
a0da0e670ba96c4245308357a2a89c74411c7106
1,168
https://github.com/linemanjs/lineman/blob/a0da0e670ba96c4245308357a2a89c74411c7106/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watc...
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a0da0e670ba96c4245308357a2a89c74411c7106
1,168
https://github.com/linemanjs/lineman/blob/a0da0e670ba96c4245308357a2a89c74411c7106/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
server = http.createServer(app) userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) if liveReloadEnabled grunt.log.writeln("Connected LiveReload middleware on port: #{liveReloadPort}") app.use(require('connect-livereload')( port: liveReloadP...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a0da0e670ba96c4245308357a2a89c74411c7106
1,168
https://github.com/linemanjs/lineman/blob/a0da0e670ba96c4245308357a2a89c74411c7106/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
app.use(apiProxy(apiProxyHost, apiPort, apiProxyChangeOrigin, relativeUrlRoot, new httpProxy.RoutingProxy())) app.use(express.bodyParser()) app.use(express.errorHandler()) userConfig.drawRoutes?(app) app.use(pushStateSimulator(process.cwd(),webRoot)) if pushStateEnabled grunt.log.writeln("...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a0da0e670ba96c4245308357a2a89c74411c7106
1,168
https://github.com/linemanjs/lineman/blob/a0da0e670ba96c4245308357a2a89c74411c7106/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:completion
completion
app.use(apiProxy(apiProxyHost, apiPort, apiProxyChangeOrigin, relativeUrlRoot, new httpProxy.RoutingProxy())) app.use(express.bodyParser()) app.use(express.errorHandler()) userConfig.drawRoutes?(app) app.use(pushStateSimulator(process.cwd(),webRoot)) if pushStateEnabled grunt.log.writeln("...
pushStateSimulator = (cwd, webRoot) -> (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxyi...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a0da0e670ba96c4245308357a2a89c74411c7106
1,168
https://github.com/linemanjs/lineman/blob/a0da0e670ba96c4245308357a2a89c74411c7106/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.r...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("f...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watc...
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlR...
var addBodyParserCallbackToRoutes, apiProxy, applyRelativeUrlRoot, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator; applyRelativeUrlRoot(app, relativeUrlRoot).listen(webPort, function() { return resetRoutesOnServerConfigChange(app); }); applyRelativeUrlRoot = function(app, relati...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, applyRelativeUrlRoot, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator; applyRelativeUrlRoot(app, relativeUrlRoot).listen(webPort, function() { return resetRoutesOnServerConfigChange...
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:completion
completion
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
prefixMatchingApiProxy = (prefix, host, port, changeOrigin, relativeUrlRoot = "", proxy) -> prefixMatcher = new RegExp(prefix) proxy.on "proxyError", handleProxyError return (req, res, next) -> if prefix and prefixMatcher.exec(req.path) req.url = relativeUrlRoot + req.url proxy.proxy...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:3:raw_corpus
raw_corpus
resetRoutesOnServerConfigChange = (app) -> watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server") if userConfig.drawRoutes? _(app.routes).ea...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
116
125
linemanjs/lineman:tasks/server.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript resetRoutesOnServerConfigChange = (app) -> watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server") ...
var resetRoutesOnServerConfigChange; resetRoutesOnServerConfigChange = function(app) { return watchr(grunt.file.expand('config/server.*'), function(err, watcher) { return watcher.on('change', function(contexts) { return _(contexts).each(function(context) { var userConfig; userConfig = fileU...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
116
125
linemanjs/lineman:tasks/server.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var resetRoutesOnServerConfigChange; resetRoutesOnServerConfigChange = function(app) { return watchr(grunt.file.expand('config/server.*'), function(err, watcher) { return watcher.on('change', function(contexts) { return _(contexts).each(function(contex...
resetRoutesOnServerConfigChange = (app) -> watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server") if userConfig.drawRoutes? _(app.routes).ea...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
116
125
linemanjs/lineman:tasks/server.coffee:3:completion
completion
resetRoutesOnServerConfigChange = (app) -> watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) ->
userConfig = fileUtils.reloadConfigurationFile("server") if userConfig.drawRoutes? _(app.routes).each (route, name) -> app.routes[name] = [] userConfig.drawRoutes(app) addBodyParserCallbackToRoutes(app)
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
2d5716b46446a4e43b7e49cb503144a7cd9c374a
1,168
https://github.com/linemanjs/lineman/blob/2d5716b46446a4e43b7e49cb503144a7cd9c374a/tasks/server.coffee
116
125
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
885545d5578c280c4e28c216cd6977fe674daa1e
1,168
https://github.com/linemanjs/lineman/blob/885545d5578c280c4e28c216cd6977fe674daa1e/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.r...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("f...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
885545d5578c280c4e28c216cd6977fe674daa1e
1,168
https://github.com/linemanjs/lineman/blob/885545d5578c280c4e28c216cd6977fe674daa1e/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watc...
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
885545d5578c280c4e28c216cd6977fe674daa1e
1,168
https://github.com/linemanjs/lineman/blob/885545d5578c280c4e28c216cd6977fe674daa1e/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
885545d5578c280c4e28c216cd6977fe674daa1e
1,168
https://github.com/linemanjs/lineman/blob/885545d5578c280c4e28c216cd6977fe674daa1e/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f7d9f1e25d037f84857ab1953d35c53675c72f10
1,168
https://github.com/linemanjs/lineman/blob/f7d9f1e25d037f84857ab1953d35c53675c72f10/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlR...
var addBodyParserCallbackToRoutes, apiProxy, applyRelativeUrlRoot, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator; applyRelativeUrlRoot(app, relativeUrlRoot).listen(webPort, function() { return resetRoutesOnServerConfigChange(app); }); applyRelativeUrlRoot = function(app, relati...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
f7d9f1e25d037f84857ab1953d35c53675c72f10
1,168
https://github.com/linemanjs/lineman/blob/f7d9f1e25d037f84857ab1953d35c53675c72f10/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, applyRelativeUrlRoot, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator; applyRelativeUrlRoot(app, relativeUrlRoot).listen(webPort, function() { return resetRoutesOnServerConfigChange...
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f7d9f1e25d037f84857ab1953d35c53675c72f10
1,168
https://github.com/linemanjs/lineman/blob/f7d9f1e25d037f84857ab1953d35c53675c72f10/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:completion
completion
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
prefixMatchingApiProxy = (prefix, host, port, changeOrigin, relativeUrlRoot, proxy) -> prefixMatcher = new RegExp(prefix) proxy.on "proxyError", handleProxyError return (req, res, next) -> if prefix and prefixMatcher.exec(req.path) req.url = relativeUrlRoot + req.url proxy.proxyReque...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f7d9f1e25d037f84857ab1953d35c53675c72f10
1,168
https://github.com/linemanjs/lineman/blob/f7d9f1e25d037f84857ab1953d35c53675c72f10/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.r...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("f...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = require("lodash"); http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watc...
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = require("lodash") http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy developmen...
userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
16
65
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlR...
var addBodyParserCallbackToRoutes, apiProxy, applyRelativeUrlRoot, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator, resetRoutesOnServerConfigChange; applyRelativeUrlRoot(app, relativeUrlRoot).listen(webPort, function() { return resetRoutesOnServerConfigChange(app); }); applyRelat...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, applyRelativeUrlRoot, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator, resetRoutesOnServerConfigChange; applyRelativeUrlRoot(app, relativeUrlRoot).listen(webPort, function() { retur...
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:2:completion
completion
applyRelativeUrlRoot(app, relativeUrlRoot).listen webPort, -> resetRoutesOnServerConfigChange(app) applyRelativeUrlRoot = (app, relativeUrlRoot) -> return app unless relativeUrlRoot? grunt.log.writeln("Mounting application at path '#{relativeUrlRoot}'.") _(express()).tap (otherApp) -> otherAp...
prefixMatchingApiProxy = (prefix, host, port, changeOrigin, proxy) -> prefixMatcher = new RegExp(prefix) proxy.on "proxyError", handleProxyError return (req, res, next) -> if prefix and prefixMatcher.exec(req.path) proxy.proxyRequest(req, res, {host, port, changeOrigin}) else n...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
66
115
linemanjs/lineman:tasks/server.coffee:3:raw_corpus
raw_corpus
watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server") if userConfig.drawRoutes? _(app.routes).each (route, name) -> app.routes[name] = [] ...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
116
123
linemanjs/lineman:tasks/server.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server") if userConfig.drawRoutes? _(app....
watchr(grunt.file.expand('config/server.*'), function(err, watcher) { return watcher.on('change', function(contexts) { return _(contexts).each(function(context) { var userConfig; userConfig = fileUtils.reloadConfigurationFile("server"); if (userConfig.drawRoutes != null) { _(app.routes)....
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
116
123
linemanjs/lineman:tasks/server.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript watchr(grunt.file.expand('config/server.*'), function(err, watcher) { return watcher.on('change', function(contexts) { return _(contexts).each(function(context) { var userConfig; userConfig = fileUtils.reloadConfigurationFile("server"); if (...
watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server") if userConfig.drawRoutes? _(app.routes).each (route, name) -> app.routes[name] = [] ...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
116
123
linemanjs/lineman:tasks/server.coffee:3:completion
completion
watchr grunt.file.expand('config/server.*'), (err, watcher) -> watcher.on 'change', (contexts) -> _(contexts).each (context) -> userConfig = fileUtils.reloadConfigurationFile("server")
if userConfig.drawRoutes? _(app.routes).each (route, name) -> app.routes[name] = [] userConfig.drawRoutes(app) addBodyParserCallbackToRoutes(app)
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/tasks/server.coffee
116
123
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
87afc409f26f583d38833c3081b17f5df30527f9
1,168
https://github.com/linemanjs/lineman/blob/87afc409f26f583d38833c3081b17f5df30527f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.regist...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("fs"); ...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
87afc409f26f583d38833c3081b17f5df30527f9
1,168
https://github.com/linemanjs/lineman/blob/87afc409f26f583d38833c3081b17f5df30527f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = ...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
87afc409f26f583d38833c3081b17f5df30527f9
1,168
https://github.com/linemanjs/lineman/blob/87afc409f26f583d38833c3081b17f5df30527f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
87afc409f26f583d38833c3081b17f5df30527f9
1,168
https://github.com/linemanjs/lineman/blob/87afc409f26f583d38833c3081b17f5df30527f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.regist...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("fs"); ...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = ...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
server.listen webPort, -> resetRoutesOnServerConfigChange(app) mountUserStaticRoutes = (app, webRoot, staticRoutes) -> _(staticRoutes).each (src, dest) -> path = if fs.existsSync(src) then src else "#{process.cwd()}/#{webRoot}/#{src}" grunt.log.writeln("Mounting static assets found in `#{path}`...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
65
114
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript server.listen webPort, -> resetRoutesOnServerConfigChange(app) mountUserStaticRoutes = (app, webRoot, staticRoutes) -> _(staticRoutes).each (src, dest) -> path = if fs.existsSync(src) then src else "#{process.cwd()}/#{webRoot}/#{src}" gru...
var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator, resetRoutesOnServerConfigChange; server.listen(webPort, function() { return resetRoutesOnServerConfigChange(app); }); mountUserStaticRoutes = function(app, webRoot, staticRoutes) { ret...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
65
114
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, mountUserStaticRoutes, prefixMatchingApiProxy, pushStateSimulator, resetRoutesOnServerConfigChange; server.listen(webPort, function() { return resetRoutesOnServerConfigChange(app); }); mountUserStat...
server.listen webPort, -> resetRoutesOnServerConfigChange(app) mountUserStaticRoutes = (app, webRoot, staticRoutes) -> _(staticRoutes).each (src, dest) -> path = if fs.existsSync(src) then src else "#{process.cwd()}/#{webRoot}/#{src}" grunt.log.writeln("Mounting static assets found in `#{path}`...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
65
114
linemanjs/lineman:tasks/server.coffee:2:completion
completion
server.listen webPort, -> resetRoutesOnServerConfigChange(app) mountUserStaticRoutes = (app, webRoot, staticRoutes) -> _(staticRoutes).each (src, dest) -> path = if fs.existsSync(src) then src else "#{process.cwd()}/#{webRoot}/#{src}" grunt.log.writeln("Mounting static assets found in `#{path}`...
if prefix and prefixMatcher.exec(req.path) proxy.proxyRequest(req, res, {host, port, changeOrigin}) else next() apiProxy = (host, port, changeOrigin, proxy) -> proxy.on "proxyError", handleProxyError return (req, res, next) -> proxy.proxyRequest(req, res, {host, port, changeOrigi...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
93728686f6b19f2082f5ce925a59e4c70a198824
1,168
https://github.com/linemanjs/lineman/blob/93728686f6b19f2082f5ce925a59e4c70a198824/tasks/server.coffee
65
114
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9
1,168
https://github.com/linemanjs/lineman/blob/1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.regist...
module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); fs = require("fs"); ...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9
1,168
https://github.com/linemanjs/lineman/blob/1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, fs, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = ...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9
1,168
https://github.com/linemanjs/lineman/blob/1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') fs = require("fs") grunt.registerTask "server", "static file & api proxy development ser...
userConfig.modifyHttpServer?(server) app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) mountUserStaticRoutes(app, webRoot, staticRoutes) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9
1,168
https://github.com/linemanjs/lineman/blob/1b17ac0cba90e40f22dffb19fe76be2a3c83b0f9/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') grunt.registerTask "server", "static file & api proxy development server", -> apiPort ...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') grunt.registerTask "server", "sta...
module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); return grunt.registerTas...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = requ...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') grunt.registerTask "server", "static file & api proxy development server", -> apiPort ...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock') grunt.registerTask "server", "static file & api proxy development server", -> apiPort ...
app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled if pushStateEnabled grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPr...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
pushStateSimulator = (cwd, webRoot) -> (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxyi...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
65
106
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript pushStateSimulator = (cwd, webRoot) -> (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, r...
var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, pushStateSimulator, resetRoutesOnServerConfigChange; pushStateSimulator = function(cwd, webRoot) { return function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
65
106
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, pushStateSimulator, resetRoutesOnServerConfigChange; pushStateSimulator = function(cwd, webRoot) { return function(req, res, next) { grunt.log.writeln(`\nPushState: '${req...
pushStateSimulator = (cwd, webRoot) -> (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxyi...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
65
106
linemanjs/lineman:tasks/server.coffee:2:completion
completion
pushStateSimulator = (cwd, webRoot) -> (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxyi...
apiProxy = (host, port, changeOrigin, proxy) -> proxy.on "proxyError", handleProxyError return (req, res, next) -> proxy.proxyRequest(req, res, {host, port, changeOrigin}) addBodyParserCallbackToRoutes = (app) -> bodyParser = express.bodyParser() _(["get", "post", "patch", "put", "delete", "op...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
a55c2631df7aed68f59ebf9f59b75de216631e57
1,168
https://github.com/linemanjs/lineman/blob/a55c2631df7aed68f59ebf9f59b75de216631e57/tasks/server.coffee
65
106
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
085bed86397b6a33a5195cdc366b6c2f7c8c0f11
1,168
https://github.com/linemanjs/lineman/blob/085bed86397b6a33a5195cdc366b6c2f7c8c0f11/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock'); grunt.registerTask "server", "st...
module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r-structr-lock'); return grunt.registerTas...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
085bed86397b6a33a5195cdc366b6c2f7c8c0f11
1,168
https://github.com/linemanjs/lineman/blob/085bed86397b6a33a5195cdc366b6c2f7c8c0f11/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = requ...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
085bed86397b6a33a5195cdc366b6c2f7c8c0f11
1,168
https://github.com/linemanjs/lineman/blob/085bed86397b6a33a5195cdc366b6c2f7c8c0f11/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r-structr-lock'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort...
app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled if pushStateEnabled grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPr...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
085bed86397b6a33a5195cdc366b6c2f7c8c0f11
1,168
https://github.com/linemanjs/lineman/blob/085bed86397b6a33a5195cdc366b6c2f7c8c0f11/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bfb84287b7e2f091a941780fd132ab1fd7c16adc
1,168
https://github.com/linemanjs/lineman/blob/bfb84287b7e2f091a941780fd132ab1fd7c16adc/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & a...
module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r'); return grunt.registerTask("server", "...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
bfb84287b7e2f091a941780fd132ab1fd7c16adc
1,168
https://github.com/linemanjs/lineman/blob/bfb84287b7e2f091a941780fd132ab1fd7c16adc/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = requ...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bfb84287b7e2f091a941780fd132ab1fd7c16adc
1,168
https://github.com/linemanjs/lineman/blob/bfb84287b7e2f091a941780fd132ab1fd7c16adc/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
app.configure -> app.use(express.compress()) app.use(express.static("#{process.cwd()}/#{webRoot}")) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled if pushStateEnabled grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPr...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bfb84287b7e2f091a941780fd132ab1fd7c16adc
1,168
https://github.com/linemanjs/lineman/blob/bfb84287b7e2f091a941780fd132ab1fd7c16adc/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & a...
module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, pushStateSimulator, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r'); grunt.registerTas...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, pushStateSimulator, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-util...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
app.use(express.static("#{process.cwd()}/#{webRoot}")) userConfig.drawRoutes?(app) addBodyParserCallbackToRoutes(app) if apiProxyEnabled if pushStateEnabled grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPrefix}' to #{apiProxyHost}:#{apiPort}") app.use(...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.wri...
var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; (function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${webRoot}/index.html'`); return res.sendfile(`${webRoot}/index.html`); }); ...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; (function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${webRoot}/index.html'`...
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:completion
completion
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
apiProxy = (host, port, proxy) -> proxy.on "proxyError", handleProxyError return (req, res, next) -> proxy.proxyRequest(req, res, {host, port}) addBodyParserCallbackToRoutes = (app) -> bodyParser = express.bodyParser() _(["get", "post", "patch", "put", "delete", "options", "head"]).each (verb)...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
bc2434ccbce7c3409cfeb158eb6b46089bf83b20
1,168
https://github.com/linemanjs/lineman/blob/bc2434ccbce7c3409cfeb158eb6b46089bf83b20/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
8ea030e0f2d68b4810d282e594d493a0460520df
1,168
https://github.com/linemanjs/lineman/blob/8ea030e0f2d68b4810d282e594d493a0460520df/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.wri...
var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; (function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${webRoot}/index.html'`); return res.sendfile(`${webRoot}/index.html`); }); ...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
8ea030e0f2d68b4810d282e594d493a0460520df
1,168
https://github.com/linemanjs/lineman/blob/8ea030e0f2d68b4810d282e594d493a0460520df/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; (function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${webRoot}/index.html'`...
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
8ea030e0f2d68b4810d282e594d493a0460520df
1,168
https://github.com/linemanjs/lineman/blob/8ea030e0f2d68b4810d282e594d493a0460520df/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:completion
completion
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
apiProxy = (host, port, proxy) -> proxy.on "proxyError", handleProxyError return (req, res, next) -> proxy.proxyRequest(req, res, {host, port}) addBodyParserCallbackToRoutes = (app) -> bodyParser = express.bodyParser() _(["get", "post", "patch", "put", "delete", "options", "head"]).each (verb)...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
8ea030e0f2d68b4810d282e594d493a0460520df
1,168
https://github.com/linemanjs/lineman/blob/8ea030e0f2d68b4810d282e594d493a0460520df/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & a...
module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, pushStateSimulator, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r'); grunt.registerTas...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, http, httpProxy, pushStateSimulator, watchr; _ = grunt.util._; http = require("http"); express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-util...
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ http = require("http") express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.en...
app.use(express.static("#{process.cwd()}/#{webRoot}")) userConfig.drawRoutes(app) if userConfig.drawRoutes addBodyParserCallbackToRoutes(app) if apiProxyEnabled if pushStateEnabled grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPrefix}' to #{apiProxyHost}:#{apiPo...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript (req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.wri...
var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; (function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${webRoot}/index.html'`); return res.sendfile(`${webRoot}/index.html`); }); ...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; (function(req, res, next) { grunt.log.writeln(`\nPushState: '${req.path}' not found in ${cwd}/${webRoot} - Serving up '${webRoot}/index.html'`...
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:2:completion
completion
(req, res, next) -> grunt.log.writeln("\nPushState: '#{req.path}' not found in #{cwd}/#{webRoot} - Serving up '#{webRoot}/index.html'") res.sendfile("#{webRoot}/index.html") handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toSt...
apiProxy = (host, port, proxy) -> proxy.on "proxyError", handleProxyError return (req, res, next) -> proxy.proxyRequest(req, res, {host, port}) addBodyParserCallbackToRoutes = (app) -> bodyParser = express.bodyParser() _(["get", "post", "patch", "put", "delete", "options", "head"]).each (verb)...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
f1d805cc4512f640c567f2ea5238d516c9e019a6
1,168
https://github.com/linemanjs/lineman/blob/f1d805cc4512f640c567f2ea5238d516c9e019a6/tasks/server.coffee
65
105
linemanjs/lineman:tasks/server.coffee:1:raw_corpus
raw_corpus
module.exports = (grunt) -> _ = grunt.util._ express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.env.API_PORT || grunt.confi...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (grunt) -> _ = grunt.util._ express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development serv...
module.exports = function(grunt) { var _, express, fileUtils, httpProxy, pushStateSimulator, watchr; _ = grunt.util._; express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r'); grunt.registerTask("server", "static file & api p...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(grunt) { var _, express, fileUtils, httpProxy, pushStateSimulator, watchr; _ = grunt.util._; express = require("express"); httpProxy = require("http-proxy"); fileUtils = require("./../lib/file-utils"); watchr = require('watch_r...
module.exports = (grunt) -> _ = grunt.util._ express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.env.API_PORT || grunt.confi...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:1:completion
completion
module.exports = (grunt) -> _ = grunt.util._ express = require("express") httpProxy = require("http-proxy") fileUtils = require("./../lib/file-utils") watchr = require('watch_r'); grunt.registerTask "server", "static file & api proxy development server", -> apiPort = process.env.API_PORT || grunt.confi...
addBodyParserCallbackToRoutes(app) if apiProxyEnabled if pushStateEnabled grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPrefix}' to #{apiProxyHost}:#{apiPort}") app.use(prefixMatchingApiProxy(apiProxyPrefix, apiProxyHost, apiPort, new httpProxy.RoutingProxy())) ...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
15
64
linemanjs/lineman:tasks/server.coffee:2:raw_corpus
raw_corpus
handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toString()}`") res.end() prefixMatchingApiProxy = (prefix, host, port, proxy) -> prefixMatcher = new RegExp(prefix) proxy.on "proxyError", handleProxyError return (req, res...
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
65
101
linemanjs/lineman:tasks/server.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toString()}`") res.end() prefixMatchingApiProxy = (prefix, host, port, proxy) -> prefixMatcher = new RegExp(prefix) prox...
var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; handleProxyError = function(err, req, res) { res.statusCode = 500; res.write(`API Proxying to \`${req.url}\` failed with: \`${err.toString()}\``); return res.end(); }; prefixMatchingApiProxy =...
CoffeeScript
JavaScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
65
101
linemanjs/lineman:tasks/server.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var addBodyParserCallbackToRoutes, apiProxy, handleProxyError, prefixMatchingApiProxy, resetRoutesOnServerConfigChange; handleProxyError = function(err, req, res) { res.statusCode = 500; res.write(`API Proxying to \`${req.url}\` failed with: \`${err.toString()...
handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toString()}`") res.end() prefixMatchingApiProxy = (prefix, host, port, proxy) -> prefixMatcher = new RegExp(prefix) proxy.on "proxyError", handleProxyError return (req, res...
JavaScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
65
101
linemanjs/lineman:tasks/server.coffee:2:completion
completion
handleProxyError = (err, req, res) -> res.statusCode = 500 res.write("API Proxying to `#{req.url}` failed with: `#{err.toString()}`") res.end() prefixMatchingApiProxy = (prefix, host, port, proxy) -> prefixMatcher = new RegExp(prefix) proxy.on "proxyError", handleProxyError return (req, res...
return (req, res, next) -> proxy.proxyRequest(req, res, {host, port}) addBodyParserCallbackToRoutes = (app) -> bodyParser = express.bodyParser() _(["get", "post", "patch", "put", "delete", "options", "head"]).each (verb) -> _(app.routes[verb]).each (route) -> route.callbacks.unshift(bodyP...
CoffeeScript
CoffeeScript
linemanjs/lineman
tasks/server.coffee
MIT
18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008
1,168
https://github.com/linemanjs/lineman/blob/18cb5d9796b5b1e4addcf92fd4aedbeb72e4a008/tasks/server.coffee
65
101