Comments (6)
@noway
If you want to host web client via express, you could just put a JS file a level up, install express via.
npm install -s express
And run code like this to serve the files.
const express = require('express')
const app = express()
const port = 3000
const path = require('path')
app.get('/', function(req, res){
res.sendFile(path.resolve('Client/index.htm'))
});
app.use(express.static('Client'));
app.listen(port, () => console.log(`Quake WebClient http server listening on port ${port}!`))
Would recommend to also use a robots.txt to ignore from search engines and perhaps bundle/minify the js.
from webquake.
Because a custom web server is not comprehensive enough. Existing servers
have things like caching an compression. Also the server shouldn't be an
NPM module, because it's a complete app, not a library, and must not be
used in other apps.
On Apr 19, 2013 12:26 AM, "Way, No" [email protected] wrote:
Hi! I found your work pretty impressive!
For web server you use abyss web server, but why not simply use node.js,
like in Server/ part?
It would be much more uniform.I think you should make Client/ as private npm module, like Server/ in my
last Pull Request—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.
from webquake.
Npm is not always library. Npm manages packages. Package may be whole app.
Because there's no need in deploying that project via npm, i turned on option "private": true
in package.json
(You can see it in pull request)
So that package not participates in npm registry. Npm here only manages dependencies.
You may say, that unnecessary setting up package.json
just for one dependency, but npm would manage that dependency very well.
He would install only some versions of library, that you using. So you can don't worries that something brokes some day because of api change.
And, you can easily add another dependencies in future! Only 1 line in config, and users still can satisfy all dependencies via npm install
.
from webquake.
About web server:
For example, express.js framework provides excellent capabilities. He has gzip compression, and caching (including Etag).
I created simple server with it, and fetching game resources from it. All works pretty well.
Connect.js also would handle this well.
And, in last, that libraries not so heavy (about 2M). They very easy to install, especially with the npm.
I think, that once there is node.js, it's much easier to use its capabilities, instead installing something else.
from webquake.
No, the goal of the project is to allow to easily install Quake anywhere on a website, not only under a specific subdomain. The main purpose of the project is not to be a proof of concept, it's to allow modders to show their mods without requiring the players to install Quake, and it's to be embedded to Quake demo sites (maybe I'll contact Speed Demos Archive owner about this). While node.js server would be optional, some users will think that it's the only way to play WebQuake, while it's not.
from webquake.
Ok then!
No node.js in Client/
from webquake.
Related Issues (20)
- No mouse control in Chrome Canary 64bit v46.0.2486 HOT 2
- Forked WebQuake supports Async IO HOT 8
- How do I use this on a Chromebook? HOT 3
- Mouse not working HOT 3
- Any way to add the full game files? HOT 5
- cant run mod files HOT 2
- What each file is for? HOT 1
- Performance issues with WebQuake build 54 (1.09) HOT 5
- Async IO #2 HOT 1
- Issue connecting from WinQuake HOT 4
- W.LoadWadFile: couldn't load gfx.wad HOT 3
- Audio buzz/click HOT 1
- Mouse jump glitchy problem with Chrome Win10 360 spin keep moving mouse to right. HOT 3
- Can someone tell me if I have this correct in the server? HOT 2
- No official online demo HOT 2
- Error compiling shader: null
- auto-connect to multiplayer server at launch HOT 2
- can i host this on github pages? HOT 1
- add quake .pak files to the chromeos version of webquake HOT 1
- Game not loading, stuck on "Starting Quake..." HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webquake.