# Encapsulate Ionic within NodeJS

**URL:** <https://forum.ionicframework.com/t/encapsulate-ionic-within-nodejs/135620>\
**Category:** ionic-v3\
**Created:** [July 18, 2018, 5:03pm UTC](https://forum.ionicframework.com/t/encapsulate-ionic-within-nodejs/135620 "2018-07-18T17:03:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaulAndrade](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@RaulAndrade](https://forum.ionicframework.com/u/RaulAndrade)\
**Post date:** [July 18, 2018, 5:03pm UTC](https://forum.ionicframework.com/t/encapsulate-ionic-within-nodejs/135620/1 "2018-07-18T17:03:48Z")

</div>

Hello, I want to upload the www folder to a server with NodeJS, the problem is that when I try to redirect the local path to the index of www that generates ionic, it conflicts with the ionic navigation

app.get (’/’, (req, res) =\> {  
res.sendFile (`$ {__ dirname} / assets / index.html`)  
})

GET / 200 6.372 ms - 1912  
GET /cordova.js 404 1,454 ms - 149  
GET /assets/js/jquery.dataTables.js 404 0.388 ms - 169  
GET /build/main.css 404 0.424 ms - 153  
GET /build/polyfills.js 404 0.796 ms - 157  
GET /build/vendor.js 404 0.232 ms - 154  
GET /build/main.js 404 0.210 ms - 152  
GET /assets/js/jquery.js 404 0.275 ms - 158  
GET /assets/js/jquery.dataTables.js 404 0.716 ms - 169

How I can avoid this

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:29pm UTC](https://forum.ionicframework.com/t/encapsulate-ionic-within-nodejs/135620/2 "2021-07-19T21:29:13Z")

</div>

Closed on July 19, 2021, 9:29pm UTC


