Skip to content

Commit

Permalink
sdfsdf
Browse files Browse the repository at this point in the history
  • Loading branch information
geewee committed Mar 29, 2019
1 parent 22bed22 commit dd25d58
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 1 deletion.
252 changes: 252 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ app.get('/', async (req, res, next) => {
try{
const city = req.query.city;
if (!city){
res.status(400)
res.send({
msg: "Must supply city as a parameter",
});
next(new Error("Must supply city as a parameter"))
}

Expand Down Expand Up @@ -41,4 +45,6 @@ const getWeatherData = memoize(async (city) => {
}
}, {maxAge: 10000});

app.listen(port, () => console.log(`Example app listening on port ${port}!`));
// app.listen(port, () => console.log(`Example app listening on port ${port}!`));

module.exports = app

0 comments on commit dd25d58

Please sign in to comment.