second-state/wasm-learning

Issue running npm express on docker WSL 2

shusiner opened this issue · 0 comments

On some examples in server.js the following line does not work, missing express package in docker as well
app.use(express.static('public'));
it works when i change it to
app.use(express.static(__dirname + "/public"));

I am using WSL 2 ubuntu and i ran the following

cd /mnt/c/.../wasm-learning/
docker run -p 8080:8080 --rm -it -v $(pwd):/app ssvm-nodejs:v1
cd app
npm install express
cd quadratic
ssvmup build
node node/server.js