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
Would be great for something like server.url('/some/path')
to return the fully qualified URL.
Seems more correct to name the API this way since multiple plugins can be loaded.
The intent of the function isn't quite clear from the name.
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.
Nesting code blocks in lists doesn't seem to render well.
The 'test' task creates coverage reports by default. This means that there is no need to call 'report' in the 'coverage' task.
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.
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.
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");
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.
Would be nice to generate some plugin boilerplate code (including test utilities)
There are certain common utilities that could be helpful for implementing plugins.
Would be nice to know when the server has stopped listening even if no callback is provided to server.stop()
.
In order to be compatible with the HTTP server API the event names must be the same.
In certain runtime environments, the port that the server process binds to may be different than what the client connects to.
Would be awesome to adjust the default values for things like ports and hostnames based on the deployment environment.
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.
Currently, changes made to the options by plugin implementations will be visible to the caller of doppio
.
The object may be empty, but it should always be defined.
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.
The plugin test section unnecessarily requires the Doppio API twice.
It seems that Doppio won't work with Socket.IO since the server API is not exposed.
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.
As a compliment to the 'ready' and 'stopped' events it seems that an 'error' event is also needed.
Doppio is a small "server container" for Node.JS web applications that make managing the server process more convenient and testable.
Should be 'makes'.
Allow specifying a base URL so that the server can run behind a proxy.
It can be useful for the server to know the context root that it is being served on.
package.json
references a license file that doesn't exist in the source code.
The search path for loading plugins should be relative to the caller and not Doppio.
In order to be compatible with the HTTP server API the event names must be the same.
When dealing with proxies or load balancers, it is sometimes useful to use different schemes internally and externally.
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.