From 522e4607352d9e32dd85cad896b0167f8fd6ed6c Mon Sep 17 00:00:00 2001 From: Jose Maria Villac Pinheiro Date: Mon, 23 Jul 2018 10:51:10 -0300 Subject: [PATCH] V. 0.7.6 - Test in production --- bin/www | 1 + client/src/components/map.js | 2 -- routes/reactMap.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/www b/bin/www index 4165d01..7a3ebda 100644 --- a/bin/www +++ b/bin/www @@ -18,6 +18,7 @@ if (process.env.NODE_ENV === 'production') { // like our main.js file or main.css file! // this guarantees that expressjs will look // for specific files in specific directories + console.log ("NEXUS-We are in production..."); app.use(express.static('../client/build')); // if get request comes in from some route or some file or for anything for my application and we do not understant, then look in some file from this directory to see if some file that matches up the request // Express will serve up the index.html file diff --git a/client/src/components/map.js b/client/src/components/map.js index b43f5f8..d0788a0 100644 --- a/client/src/components/map.js +++ b/client/src/components/map.js @@ -7,9 +7,7 @@ export default class Map extends Component<*, State> { super(props); this.state = { }; - } - render() { return (
diff --git a/routes/reactMap.js b/routes/reactMap.js index 7babe8f..cac2bc5 100644 --- a/routes/reactMap.js +++ b/routes/reactMap.js @@ -1,6 +1,6 @@ module.exports = router => { router.get("/consumer", function (req, res, next) { console.log ("Agora vai abrir a página do React Client ..."); - res.redirect("./client/public/index1.html"); + res.redirect("../client/public/index1.html"); }); }; \ No newline at end of file -- libgit2 0.21.2