Skip to content

Commit

Permalink
Remove server-side logic
Browse files Browse the repository at this point in the history
  • Loading branch information
frosas committed Dec 28, 2018
1 parent 6e58938 commit 22e0f16
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 48 deletions.
4 changes: 0 additions & 4 deletions .env-example

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/node_modules
/dist
/.env
/dist
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ Copy `.env-example` to `.env` and edit it as needed.
```bash
$ npm i
$ npm run watch
$ npm run browser
```

Open http://localhost:8080

# Enabling debugging

In the browser console:
Expand Down
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[headers]]
for = "/scripts/service-worker.js"
[headers.values]
Cache-Control = "max-age=0"
Service-Worker-Allowed = "/" # See https://developers.google.com/web/updates/2018/06/fresher-sw
149 changes: 144 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@
"name": "lag",
"version": "0.0.0",
"private": true,
"main": "src/server/webServer",
"scripts": {
"build": "webpack -p",
"test": "mocha 'test/**/*.js'",
"watch": "concurrently --kill-others --names webpack,lint,mocha,web-server \"npm run watch-webpack\" \"npm run watch-lint\" \"npm run watch-mocha\" \"npm run watch-web-server\"",
"watch-webpack": "onchange -i webpack.config.js 'src/{server,universal}/**/*.{js,ts}' -- webpack --watch",
"watch": "concurrently --kill-others --names webpack,lint,mocha,web-server \"npm run watch-webpack\" \"npm run watch-lint\" \"npm run watch-mocha\" \"npm run web-server\"",
"watch-lint": "concurrently -k -n eslint,tslint \"npm run watch-eslint\" \"npm run watch-tslint\"",
"watch-eslint": "onchange -i '{src,test}/**/*.js' -- eslint . --fix",
"watch-tslint": "onchange -i 'src/**/*.ts' -- tslint 'src/**/*.ts' --fix",
"watch-mocha": "onchange -i '{src,test}/**/*.js' -- npm t",
"watch-web-server": "onchange -i 'src/{server,universal}/**/*.js' -- npm start",
"start": "node -r dotenv/config .",
"browser": "source .env && open http://localhost:$PORT"
"web-server": "http-server dist/browser"
},
"babel": {
"presets": [
Expand Down Expand Up @@ -43,13 +40,13 @@
"css-loader": "^0.28.11",
"d3": "^4.12.2",
"debug": "^3.1.0",
"dotenv": "^4.0.0",
"eslint": "^4.19.1",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.9.1",
"express": "^4.16.3",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"html-webpack-plugin": "^3.2.0",
"http-server": "^0.11.1",
"lodash-es": "^4.17.10",
"mocha": "^5.2.0",
"onchange": "^4.0.0",
Expand All @@ -66,4 +63,4 @@
"devDependencies": {
"webpack-command": "^0.2.0"
}
}
}
4 changes: 1 addition & 3 deletions src/browser/DocumentIcon.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
declare var BUILD_ID: any;

import Pings from "./Pings";
import User from "./User";

const getBulletUrl = (color: string) => {
return `images/bullet_${color}.png?v=${BUILD_ID}`;
return `images/bullet_${color}.png`;
};

const getColor = (lag: number) => {
Expand Down
26 changes: 0 additions & 26 deletions src/server/webServer.js

This file was deleted.

0 comments on commit 22e0f16

Please sign in to comment.