mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
clean up
This commit is contained in:
parent
48ebe38e08
commit
5a12e30996
18
examples/react/.gitignore
vendored
18
examples/react/.gitignore
vendored
@ -1,18 +0,0 @@
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "gun-react-examples",
|
||||
"version": "1.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"gun": "file:../..",
|
||||
"react": "^15.5.4",
|
||||
"react-dom": "^15.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"express": "^4.15.2",
|
||||
"express-http-proxy": "^0.11.0",
|
||||
"react-scripts": "0.9.5"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test --env=jsdom",
|
||||
"eject": "react-scripts eject",
|
||||
"server": "PORT=8081 node ./server.js"
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
console.log("If modules not found, run `npm install` in /example folder!");
|
||||
var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765;
|
||||
var host = process.env.OPENSHIFT_NODEJS_HOST || process.env.VCAP_APP_HOST || process.env.HOST || 'localhost';
|
||||
|
||||
var express = require('express');
|
||||
var proxy = require('express-http-proxy');
|
||||
var http = require('http');
|
||||
var app = express();
|
||||
var server = http.createServer(app);
|
||||
|
||||
var Gun = require('gun');
|
||||
var gun = Gun({
|
||||
file: 'data.json',
|
||||
web: server
|
||||
});
|
||||
|
||||
app.use(Gun.serve);
|
||||
app.use(proxy(host + ':8765'));
|
||||
server.listen(port);
|
||||
|
||||
console.log('Server started on port ' + port + ' with /gun');
|
Loading…
x
Reference in New Issue
Block a user