mikelangelo-project / osv-microservice-demo

Simple Node.js Microservice application use to demonstrate the use of OSv and Capstan
13 stars 1 forks source link

Adjust storage parameters to support running in OSv #1

Closed miha-plesko closed 7 years ago

miha-plesko commented 7 years ago

There are two problems with existing code that cause application fail when running in OSv. Both result in OSv crash.

1) double-slash path //storage/0.png and //worker/0.png when __dirname is / (in OSv, this is the case) 2) non-existing folder /storage/ and /worker/

The first problem is solved by replacing // -> / and the second by adding empty folders on git.

gberginc commented 7 years ago

I am not sure about the first issue. I had empy dirs in the root and had no problems with //storage. It's really interesting, why OSv crashes for you.

The second problem I admit, I forgot to push those two .gitkeeps :).

miha-plesko commented 7 years ago

Yes! It could be that the crash was about missing folder in both cases. I first fixed the // and then since the error persisted I've created empty folders. Now I understand why people say: "one commit should only fix one problem" 😄