Index now works
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
# web
|
||||
|
||||
|
||||
The purpose of this project is to build a web application that enables subscribing to notifications when new products are published on various ad based marketplaces. The MVP will be only based on OLX.ba
|
||||
The purpose of this project is to build a web application that enables subscribing to notifications when new products are published on various ad based marketplaces. The MVP will be only based on OLX.ba
|
||||
|
||||
|
||||
ENV:
|
||||
JAWSDB_URL='mysql://sq4dlf9mz49avli0:gqy5vzmzyhp0837x@tuy8t6uuvh43khkk.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/rxhzg1550441ftqk'
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
const getVrstaNekretnine = (req,res) => {
|
||||
res.send('<html><body><h1>Hamo</h1></body></html>');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getVrstaNekretnine
|
||||
};
|
||||
|
||||
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