Commit 522e4607352d9e32dd85cad896b0167f8fd6ed6c

Authored by José Maria Villac Pinheiro
1 parent 182a7ac9

V. 0.7.6 - Test in production

@@ -18,6 +18,7 @@ if (process.env.NODE_ENV === 'production') { @@ -18,6 +18,7 @@ if (process.env.NODE_ENV === 'production') {
18 // like our main.js file or main.css file! 18 // like our main.js file or main.css file!
19 // this guarantees that expressjs will look 19 // this guarantees that expressjs will look
20 // for specific files in specific directories 20 // for specific files in specific directories
  21 + console.log ("NEXUS-We are in production...");
21 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 22 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
22 23
23 // Express will serve up the index.html file 24 // Express will serve up the index.html file
client/src/components/map.js
@@ -7,9 +7,7 @@ export default class Map extends Component<*, State> { @@ -7,9 +7,7 @@ export default class Map extends Component<*, State> {
7 super(props); 7 super(props);
8 this.state = { 8 this.state = {
9 }; 9 };
10 -  
11 } 10 }
12 -  
13 render() { 11 render() {
14 return ( 12 return (
15 <div> 13 <div>
routes/reactMap.js
1 module.exports = router => { 1 module.exports = router => {
2 router.get("/consumer", function (req, res, next) { 2 router.get("/consumer", function (req, res, next) {
3 console.log ("Agora vai abrir a página do React Client ..."); 3 console.log ("Agora vai abrir a página do React Client ...");
4 - res.redirect("./client/public/index1.html"); 4 + res.redirect("../client/public/index1.html");
5 }); 5 });
6 }; 6 };
7 \ No newline at end of file 7 \ No newline at end of file