Skip to content

Commit

Permalink
Fix some issues
Browse files Browse the repository at this point in the history
- add LICENSE
- switch from node-static to serve-static due to numerous vulnerabilities unfixed for years
- update README
- make type checking more strict
- fix RoomList.get if room does not exist
  • Loading branch information
GarboMuffin committed Jun 13, 2020
1 parent 5364aa0 commit c674a7e
Show file tree
Hide file tree
Showing 14 changed files with 320 additions and 94 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2020 Thomas Weber

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
This is a cloud data server for forkphorus.
# cloud-server

- this is not a reimplementation of the Scratch cloud data server
- this does not implement the same protocol as the Scratch cloud data server
- this is not a "permanent"/"long term" data server, all "rooms" are short lived and destructible
- this is not used by or part of Scratch, obviously
This is a cloud data server for [forkphorus](https://forkphorus.github.io/).

## This is not

- a reimplementation of the Scratch cloud data server (protocols have several differences)
- a "permanent" or "long term" data server, all "rooms" are removed when they are empty for a while

## Setup

Needs Node.js and npm.

```
git clone https://github.com/forkphorus/cloud-server
cd cloud-server
npm install
npm start
```

## Configuration

HTTP requests are served static files from the public directory.

Change the PORT environment variable (or PORT in src/config.js) to change the port.

If you use a proxy such as nginx set the TRUST_PROXY environment variable (or TRUST_PROXY in src/config.js) to `true` to make log messages include the correct IP addresses.
Loading

0 comments on commit c674a7e

Please sign in to comment.