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 batch = new Ext.data.Batch(); | |
batch.start = function () {}; | |
// Sync your stores | |
myStore.sync({ | |
batch: batch | |
}); | |
// When done | |
delete batch.start; | |
batch.start(); |
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
function cloneFunction(functionToClone) { | |
functionToClone = functionToClone.toString(); | |
var paramStart = functionToClone.indexOf('('), | |
paramEnd = functionToClone.indexOf(')'), | |
paramList = functionToClone.substr(paramStart + 1, paramEnd - paramStart - 1).split(','), | |
bodyStart = functionToClone.indexOf('{'), | |
bodyEnd = functionToClone.lastIndexOf('}'), | |
body = functionToClone.substr(bodyStart + 1, bodyEnd - bodyStart - 1), | |
len, | |
idx, |
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 path = require('path') | |
const express = require('express') | |
const app = express() | |
const port = 8081 | |
const wwwRoot = path.join(__dirname, '../www') | |
app.use(express.static(wwwRoot)) | |
app.get('/', (req, res) => res.sendFile(path.join(wwwRoot, 'static.html'))) | |
app.listen(port, () => console.log(`Listening on port ${port}!`)) |
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
{ | |
"name": "your-project", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "serve" | |
}, | |
"dependencies": { | |
"serve": "11.3.0" | |
} | |
} |
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
{ | |
"port": 8080, | |
"mappings": [{ | |
"match": "^/$", | |
"file": "../www/static.html" | |
}, { | |
"match": "^/(.*)", | |
"file": "../www/$1" | |
}] | |
} |
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
{ | |
"match": "^/(.*)", | |
"file": "../www/$1" | |
} |
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 { read } = require('reserve') | |
read('reserve.json').then(configuration => /* ... */) |
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 { check } = require('reserve') | |
check({ | |
port: 8080, | |
mappings: [{ | |
/* ... */ | |
}] | |
}).then(configuration => /* ... */) |
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 { serve } = require('reserve') | |
serve({ /* configuration */ }) | |
.on('ready', ({ url }) => { | |
console.log(`Server running at ${url}`) | |
}) |
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
{ | |
"match": "^/proxy/(https?)/(.*)", | |
"url": "$1://$2" | |
} |
OlderNewer