Skip to content

Commit

Permalink
Fixes for express routing
Browse files Browse the repository at this point in the history
  • Loading branch information
Pillowbee committed Apr 16, 2024
1 parent c8750d6 commit 110aede
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

app.use(express.static(path.join(__dirname, '../dist')))
app.get('/', function (req, res) {

app.get('/*', function (req, res) {
res.sendFile(path.join(__dirname, '../dist/index.html'))
})


app.listen(3000, () => {
console.log('Server started at port 3000')
})

0 comments on commit 110aede

Please sign in to comment.