app.use( '/', express.static( path.join(__dirname, 'build')));
app.use('/admin/', express.static(path.join(__dirname, 'build2')));
app.get('/', function(req ,res){
res.sendFile( path.join(__dirname, 'build/index.html'))
})
app.get('/admin/', function(req, res){
res.sendFile(path.join(__dirname, 'build2/index.html'))
})
이런 식으로 프로젝트를 2개로 나누어서 build 와 build2를 같이 넣고 '/admin/'일 때는 다른 path를 사용하게 했습니다.
그런데 '/'관련 프로젝트는 라우팅이 잘 되는 반면 '/admin/' 일 때는 첫 페이지만 작동을하고
다른 페이지들은 404 not founnd 에러만 나타내고 있습니다. 혹시 어떤게 문제인지 알 수 있을까요? 다른 것들 주석도 쳐보고
해봤는데 해결이 되지 않아서 답답해서 올립니다.