Skip to content

Commit

Permalink
add local server stuff to avoid CORS bullshit
Browse files Browse the repository at this point in the history
edit: ooooof it's slow

I'd like to switch to npm's http-server:
  https://stackoverflow.com/questions/12905426/what-is-a-faster-alternative-to-pythons-http-server-or-simplehttpserver
  https://www.npmjs.com/package/http-server
but there's a dep error right now b/c of a security thing with a dep.
See also
  http-party/http-server#521
  jfhbrook/node-ecstatic#256 (comment)
  • Loading branch information
pancelor committed May 3, 2019
1 parent d90f3af commit 909909b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Still very much in-development

option 1: play online at https://pancelor.github.io/sokosoko/

option 2: `git clone` this repo; open index.html; play in browser
option 2:
* `git clone` this repo
* run `./server.sh`
* open browser to localhost:8000

## Credits / Inspirations

Expand Down
2 changes: 2 additions & 0 deletions scripts/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ function processMenuInput(dir) {
if (!CanMoveToTile(pos)) return false

menuSelectPos = pos
playSound(sndWalk)

Raf()
return true
}
Expand Down
3 changes: 3 additions & 0 deletions server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

python -m SimpleHTTPServer 8000

0 comments on commit 909909b

Please sign in to comment.