serving static files with comanche
-
02-11-2019 - |
Question
I used to use this code to serve static files from Comanche web server from within Pharo 1.2 image:
createService | contentPath dirPath svc ma | contentPath := 'htdocs'. dirPath := FileDirectory default fullNameFor: contentPath. svc := (HttpService on: self port) name: 'seaside-' , self port greaseString. ma := ModuleAssembly core. ma alias: '/static' to: [ ma serverRoot: dirPath. ma documentRoot: dirPath. ma directoryIndex: 'index.html index.htm'. ma serveFiles ]. ma addPlug: self. svc plug: ma rootModule. ^ svc
The code if from http://samadhiweb.com/blog/2011.07.10.seaside.comanche.staticfiles.html
Unfortunately, this doesn't work any more on Pharo 1.3. ModuleAssembly class doesn't exist any more. So how do I setup comanche to serve static files?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow