Add Windows support
After initial tests (with just a local server), it appears that Site.js mostly runs under native Windows (not WSL) once one Linux/macOS-specific file path line is replaced:
Quick hack to get it running, in index.js
~ line 649:
const pathName = process.platform === 'win32' ? absolutePathToServe.match(/.*\\(.*?)/)[1] : absolutePathToServe.match(/.*\/(.*?)$/)[1]
Issues
- Path issues remain for dynamic routes, which aren’t loaded in (but doesn’t throw)
Untested
- Most things, at this point. Only ran the local server and hit it at https://localhost.
Documentation
- Document permission dialogue on first run
- Document Windows Defender dialogue on first run
Thoughts
It might actually be easier to get Site.js running under native Windows than to get it running under Windows Subsystem For Linux.