Closed GuusDijkhuis closed 6 years ago
Hey @GuusDijkhuis! Have you tried if the app actually works? I tried running it with npm start
but it immediately errors out..
~/Development/shelter [master]
☛ npm start
> shelter@1.0.0 start /Users/rijkvanzanten/Development/shelter
> node server
/Users/rijkvanzanten/Development/shelter/server/index.js:9
.set('views', 'view');
^
SyntaxError: Unexpected token .
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:588:28)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:201:16)
at bootstrap_node.js:626:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shelter@1.0.0 start: `node server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shelter@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rijkvanzanten/.npm/_logs/2018-03-13T13_42_21_053Z-debug.log
I've got some ;
after each line in module.exports = express(). So I removes all the ;
and the error is removed.
This looks like a great start @GuusDijkhuis, well done!
curl http://localhost:1902/89590 --verbose
gives HTML)remove
function, but you’re rendering HTML!server/start
directory you added 🤔views
, but you’re not using it anywhere? What do you need it for? 🤷♂️Other than all the above points, you’re well on your way. Good luck completing this and with the storage assignment! 💪
The shelter assignment is not too bad but it cost much time. After all I came further than I thought. The first bullet point was a misunderstanding on my part. I've done the one with db.remove(). After the get function de db.remove was a lot easier, it was almost the same, but I'd an issue with the errorcodes. At least I'd learned something, and that's what I want.
Klik dan!