Skip to content

Commit

Permalink
feat: allow Express-like port passing signature for app.listen().
Browse files Browse the repository at this point in the history
  • Loading branch information
asos-craigmorten committed May 26, 2020
1 parent dc60ae7 commit 7084994
Show file tree
Hide file tree
Showing 62 changed files with 586 additions and 492 deletions.
4 changes: 4 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## [0.4.1] - 26-05-2020

- feat: allow Express-like `port` passing signature for `app.listen()`.

## [0.4.0] - 25-05-2020

- feat: initial serveStatic implementation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ app.use((req, res) => {
res.send("Hello World");
});

app.listen({ port: 3333 });
app.listen(3000);
```

## Installation
Expand Down
1 change: 1 addition & 0 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
fromFileUrl,
basename,
join,
dirname,
} from "https://deno.land/std@0.52.0/path/mod.ts";
export { setImmediate } from "https://deno.land/std@0.52.0/node/timers.ts";
export { Sha1 } from "https://deno.land/std@0.52.0/hash/sha1.ts";
Expand Down
50 changes: 25 additions & 25 deletions docs/classes/_response_.response.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3>app</h3>
<div class="tsd-signature tsd-kind-icon">app<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_types_.application.html" class="tsd-signature-type">Application</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L32">response.ts:32</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L32">response.ts:32</a></li>
</ul>
</aside>
</section>
Expand All @@ -148,7 +148,7 @@ <h3>body</h3>
<div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <a href="../modules/_types_.html#denoresponsebody" class="tsd-signature-type">DenoResponseBody</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L31">response.ts:31</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L31">response.ts:31</a></li>
</ul>
</aside>
</section>
Expand All @@ -158,7 +158,7 @@ <h3>headers</h3>
<div class="tsd-signature tsd-kind-icon">headers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Headers</span><span class="tsd-signature-symbol"> = new Headers()</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L30">response.ts:30</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L30">response.ts:30</a></li>
</ul>
</aside>
</section>
Expand All @@ -168,7 +168,7 @@ <h3>locals</h3>
<div class="tsd-signature tsd-kind-icon">locals<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L34">response.ts:34</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L34">response.ts:34</a></li>
</ul>
</aside>
</section>
Expand All @@ -178,7 +178,7 @@ <h3>req</h3>
<div class="tsd-signature tsd-kind-icon">req<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_types_.request.html" class="tsd-signature-type">Request</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L33">response.ts:33</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L33">response.ts:33</a></li>
</ul>
</aside>
</section>
Expand All @@ -188,7 +188,7 @@ <h3>status</h3>
<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Status</span><span class="tsd-signature-symbol"> = 200</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L29">response.ts:29</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L29">response.ts:29</a></li>
</ul>
</aside>
</section>
Expand All @@ -205,7 +205,7 @@ <h3>append</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L49">response.ts:49</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L49">response.ts:49</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -240,7 +240,7 @@ <h3>attachment</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L62">response.ts:62</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L62">response.ts:62</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -269,7 +269,7 @@ <h3>clear<wbr>Cookie</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L101">response.ts:101</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L101">response.ts:101</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -298,7 +298,7 @@ <h3>cookie</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L84">response.ts:84</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L84">response.ts:84</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -330,7 +330,7 @@ <h3>download</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L124">response.ts:124</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L124">response.ts:124</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -366,7 +366,7 @@ <h3>end</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L149">response.ts:149</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L149">response.ts:149</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -394,7 +394,7 @@ <h3>etag</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L166">response.ts:166</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L166">response.ts:166</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -427,7 +427,7 @@ <h3>get</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L189">response.ts:189</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L189">response.ts:189</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -456,7 +456,7 @@ <h3>json</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L205">response.ts:205</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L205">response.ts:205</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -488,7 +488,7 @@ <h3>jsonp</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L231">response.ts:231</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L231">response.ts:231</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -520,7 +520,7 @@ <h3>links</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L281">response.ts:281</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L281">response.ts:281</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -554,7 +554,7 @@ <h3>location</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L311">response.ts:311</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L311">response.ts:311</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -589,7 +589,7 @@ <h3>send</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L334">response.ts:334</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L334">response.ts:334</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -621,7 +621,7 @@ <h3>send<wbr>File</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L401">response.ts:401</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L401">response.ts:401</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -650,7 +650,7 @@ <h3>send<wbr>Status</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L432">response.ts:432</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L432">response.ts:432</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -684,7 +684,7 @@ <h3>set</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L454">response.ts:454</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L454">response.ts:454</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -719,7 +719,7 @@ <h3>set<wbr>Status</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L476">response.ts:476</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L476">response.ts:476</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -750,7 +750,7 @@ <h3>type</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L497">response.ts:497</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L497">response.ts:497</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -785,7 +785,7 @@ <h3>unset</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/af2692b/src/response.ts#L510">response.ts:510</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/dc60ae7/src/response.ts#L510">response.ts:510</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h1>opine</h1>
res.send(<span class="hljs-string">"Hello World"</span>);
});

app.listen({ port: <span class="hljs-number">3333</span> });</code></pre>
app.listen(<span class="hljs-number">3000</span>);</code></pre>
<a href="#installation" id="installation" style="color: inherit; text-decoration: none;">
<h2>Installation</h2>
</a>
Expand Down
Loading

0 comments on commit 7084994

Please sign in to comment.