second-state / wasm-learning

Building Rust functions for Node.js to take advantage of Rust's performance, WebAssembly's security and portability, and JavaScript's ease-of-use. Demo code and recipes.
https://www.secondstate.io/articles/getting-started-with-rust-function/
485 stars 102 forks source link

Issue running npm express on docker WSL 2 #2

Open shusiner opened 4 years ago

shusiner commented 4 years ago

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