DEV Community

joynathbarman
joynathbarman

Posted on

Deployee Angular 13 on Node server

Hey everyone i am a beginner in angular, recently i created a angular application and i want to deployee it into a node server, so the deployment the steps i followed-

  • done production build with ng build the created a node server.js file on the same dir with express and added the following code
const express = require('express')
const app = express()
const port = 3000
app.use('/',express.static("dist/my-app"));
app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})
Enter fullscreen mode Exit fullscreen mode

but i am getting 404 errors for all the js files. Please suggest me where am i doing wrong.

Image description

Discussion (0)