Done-ssr-middleware not working in express (404 steal.js)


#1

I have trouble running my app donejs in express. I’m using “done-ssr-middleware” to create a route as the documentation says. (https://github.com/donejs/done-ssr-middleware)

The problem is when the page called is configured as donejs app, and the errors ocurres in steal.js .

I understand the page is interpreted in my brower but not in the server. And then I see the errors after loading the page. When was interpreted the stache file.

I think the SSR is not working, but i dont not have to see the errors.

Browser


APP

index.stache

donejs package.json

Express app - done-ssr-middleware


#2

Hi @Alejandro_Parra, it looks like Express is just serving the public folder (line 22 of app.js), but the node_modules are in src.

I think there are at least a couple ways you could solve this:

  1. Move everything in src to your public folder. That’s what we do in our Bitballs example.
  2. Write a script that installs your dependencies in public instead. We do something similar in our Bitcentive app.

#3

Hi @chasen ,The problem was resolved

Can you tell me because the donejs app need installed in public directory ?

thanks


#4

I’m not sure what resolved the issue; did you change something or re-run anything?


#5

I moved all src to public, like bitballs example.