PS D:\CODE\2077\ONLINESHOP> npm run dev
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="44372c2b3440">[email protected]</a> dev D:\CODE\2077\ONLINESHOP
> SET NODE_ENV=DEVELOPMENT& nodemon backend/server
> [nodemon] 2.1.3
> [nodemon] to restart at any time, enter `rs`
> [nodemon] watching path(s): *.*
> [nodemon] watching extensions: js,mjs,json
> [nodemon] starting `node backend/server.js`
> D:\CODE\2077\ONLINESHOP\backend\routes\product.js:6
> router.routes('/products').get(getProducts);
^
> TypeError: router.routes is not a function
> at Object.<anonymous> (D:\CODE\2077\ONLINESHOP\backend\routes\product.js:6:8)
> at Module._compile (internal/modules/cjs/loader.js:1063:30)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
> at Module.load (internal/modules/cjs/loader.js:928:32)
> at Function.Module._load (internal/modules/cjs/loader.js:769:14)
> at Module.require (internal/modules/cjs/loader.js:952:19) at require >(internal/modules/cjs/helpers.js:88:18)
> at Object.<anonymous> (D:\CODE\2077\ONLINESHOP\backend\app.js:8:18)
> at Module._compile (internal/modules/cjs/loader.js:1063:30)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
> [nodemon] app crashed - waiting for file changes before starting...