Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
frikkha committed Nov 14, 2019
1 parent d648024 commit 236f5e2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next


.idea
7 changes: 4 additions & 3 deletions routes/searchByMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const router = express();
router.use(express.json());


const Menu = require('../models/menu');
const MenuItems = require('../models/menuItems');
const Menu = require('../models/menu.js');
const MenuItems = require('../models/menuItems.js');

//const Sequelize = require('sequelize');
//const Op = Sequelize.Op;
Expand Down Expand Up @@ -34,9 +34,10 @@ router.get('/', async (req, res) => {
*/

router.get('/', (req, res) => {
console.log('hello world');
console.log(req.parameters.menuItemName);
res.status(200).send('almost there');
})

module.exports = router;


Expand Down
9 changes: 6 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ app.use('/api/user/login', login);
app.use('/api/user/customer/register', registrationCustomer);
app.use('/api/user/owner/register', registrationOwner);
app.use('/api/image',image);
app.use('/api/user/customer/searchByMenuItem', searchByMenuItem);
app.use('/api/user/customer/menu/searchByMenuItem', searchByMenuItem);


//Test DB
Expand All @@ -50,14 +50,17 @@ app.use(bodyParser.json());

const path = require("path");


app.use(express.static(path.join(__dirname, "thespoon", "build")));


/*
app.get("*", (req, res) => {
res.sendFile(path.join(__dirname, "thespoon", "build", "index.html"));
});
*/


//END OF THE REQUIRED CODE TO MAKE THE DEPLOY WORK

const port = process.env.PORT || 5000;
Expand Down

0 comments on commit 236f5e2

Please sign in to comment.