Skip to content

Commit

Permalink
More sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
silviogutierrez committed Jul 20, 2018
1 parent 23f7dc9 commit f57e8f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"dependencies": {
"@types/express": "^4.16.0",
"@types/http-proxy": "^1.16.2",
"@types/http-proxy-middleware": "^0.17.5",
"@types/node": "^10.5.2",
"@types/react": "^16.4.6",
Expand All @@ -15,6 +16,7 @@
"csstips": "^0.3.0",
"express": "^4.16.3",
"express-http-proxy": "^1.2.0",
"http-proxy": "^1.17.0",
"http-proxy-middleware": "^0.18.0",
"json-schema-to-typescript": "^5.5.0",
"nodemon": "^1.17.5",
Expand Down
8 changes: 7 additions & 1 deletion server/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {compile} from 'json-schema-to-typescript'
import fs from 'fs';

import proxy2 from 'http-proxy-middleware';
import httpProxy from 'http-proxy';

import webpackConfig from '../webpack.config';

Expand Down Expand Up @@ -159,7 +160,12 @@ export default {
}));
*/

app.use(PATHS, ssrProxy2);
// app.use(PATHS, ssrProxy2);
const proxy = httpProxy.createProxyServer();

app.use(PATHS, (req, res, next) => {
proxy.web(req, res, { target: {socketPath: '/home/silviogutierrez/www/node.silviogutierrez.com/cgi/node.silviogutierrez.com.sock'} as any });
})
app.listen(port, callback);
},
};

0 comments on commit f57e8f9

Please sign in to comment.