jagoda / doppio Goto Github PK
View Code? Open in Web Editor NEWSmall server container to make managing and testing server processes easier.
License: MIT License
Small server container to make managing and testing server processes easier.
License: MIT License
package.json
references a license file that doesn't exist in the source code.
Would be nice to know when the server is ready even if no callback is provided or server.start()
is not called explicitly.
Seems that it makes more sense to run the plugins in the order specified as long as the default plugin always runs last.
When dealing with proxies or load balancers, it is sometimes useful to use different schemes internally and externally.
As a compliment to the 'ready' and 'stopped' events it seems that an 'error' event is also needed.
Would be great for something like server.url('/some/path')
to return the fully qualified URL.
Question posed from review -- it at least seems that it would be consistent with the other attributes.
error
events from the underlying server instance aren't forwarded to the upper level handlers.
It seems that Doppio won't work with Socket.IO since the server API is not exposed.
The 'test' task creates coverage reports by default. This means that there is no need to call 'report' in the 'coverage' task.
Currently calling server.start()
with an explicit port changes the value returned by server.url()
(if previously configured). This is probably not what is expected.
Currently, changes made to the options by plugin implementations will be visible to the caller of doppio
.
It can be useful for the server to know the context root that it is being served on.
Doppio is a small "server container" for Node.JS web applications that make managing the server process more convenient and testable.
Should be 'makes'.
var server = doppio({ autostart: false, port: 8080 }, app);
server.start(0, function () {
console.log(server.url());
});
Prints "http://localhost:8080". Instead, the server should pick an arbitrary open port.
If passing a string representation (like an environment variable) to the { port: . . . }
option when creating a server instance, the server will ignore the option and bind to an arbitrary port.
Seems more correct to name the API this way since multiple plugins can be loaded.
Allow specifying a base URL so that the server can run behind a proxy.
In order to be compatible with the HTTP server API the event names must be the same.
The object may be empty, but it should always be defined.
May be safer to unload an individual plugin. The best option may be to find a way to test the loadPlugin API without exposing this publically.
Would be nice to generate some plugin boilerplate code (including test utilities)
The intent of the function isn't quite clear from the name.
Would be awesome to adjust the default values for things like ports and hostnames based on the deployment environment.
The plugin test section unnecessarily requires the Doppio API twice.
Nesting code blocks in lists doesn't seem to render well.
Would be nice to know when the server has stopped listening even if no callback is provided to server.stop()
.
Would be convenient to be able to specify multiple plugins to load so that instead of
doppio.loadPlugin("A");
doppio.loadPlugin("B");
a developer could use
doppio.loadPlugin("A", "B");
In order to be compatible with the HTTP server API the event names must be the same.
There are certain common utilities that could be helpful for implementing plugins.
In certain runtime environments, the port that the server process binds to may be different than what the client connects to.
The hostname default is currently provided in the url()
method. Providing this default value in the default plugin would be more consistent with the other default values.
The search path for loading plugins should be relative to the caller and not Doppio.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.