My code looks like this:
and the terminal output looks like this:
But I dont want the path to be under "routes". But rather under bears/public/...
Appreciate any help!
In your current setup, you're just joining the path as a string. This doesn't allow you to move up levels within your folder structure.
var path = require("path") var target_path = path.join(__dirname, "../public/images/bjornar")
The path module will join them as if you were moving around in command line.
In your current setup, you're just joining the path as a string. This doesn't allow you to move up levels within your folder structure.
The path module will join them as if you were moving around in command line.