Index now works
This commit is contained in:
9
index.js
9
index.js
@@ -1,3 +1,5 @@
|
||||
const getVrstaNekretnine = require('./app/controllers/vrsta_nekretnine').getVrstaNekretnine;
|
||||
|
||||
let express = require("express");
|
||||
const path = require("path");
|
||||
const bodyParser = require("body-parser");
|
||||
@@ -95,11 +97,6 @@ app.post("/api/payforalert", function(request, response) {
|
||||
});
|
||||
});
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'frontend-react/build')));
|
||||
|
||||
// Anything that doesn't match the above, send back index.html
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname + '/frontend-react/build/index.html'))
|
||||
})
|
||||
app.get('/', getVrstaNekretnine);
|
||||
|
||||
app.listen(port, () => console.log(`Example app listening on port ${port}!`));
|
||||
|
||||
Reference in New Issue
Block a user