-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
45 lines (37 loc) · 7.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html><html lang=""><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Agio · Easily way to build APIs with NodeJS</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Easily way to build APIs with NodeJS"/><meta property="og:title" content="Agio · Easily way to build APIs with NodeJS"/><meta property="og:type" content="website"/><meta property="og:url" content="https://agio-framework.github.io//"/><meta property="og:description" content="Easily way to build APIs with NodeJS"/><meta property="og:image" content="https://agio-framework.github.io/img/undraw_online.svg"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://agio-framework.github.io/img/undraw_tweetstorm.svg"/><link rel="shortcut icon" href="/img/icon-monochrome.svg"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Raleway:200|Roboto+Mono&display=swap"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"/><script type="text/javascript" src="//buttons.github.io/buttons.js"></script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/icon-monochrome.svg" alt="Agio"/><h2 class="headerTitleWithLogo">Agio</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/docs" target="_self">Docs</a></li><li class=""><a href="/docs/docs" target="_self">Get Started</a></li><li class=""><a href="/docs/docs" target="_self">CLI</a></li></ul></nav></div></header></div></div><div class="navPusher"><div><div class="homeContainer"><div class="wrapperHero" style="background-color:#8668ed;height:400px"><div class="homeSplashFade"><div class="wrapper homeWrapper animated fadeIn faster"><div style="padding-top:50px" class="animated fadeIn"><p style="font-size:2.5em">Easily way to build APIs with NodeJS</p><p style="font-size:1em;max-width:600px;margin:auto;word-spacing:1.3px">Agio is a smaller framework to build HTTP APIs with NodeJS and Typescript. Connect to MongoDB and SQL databases, build controllers, services, validators and serve faster.</p></div><div style="padding-top:40px;display:block"><div class="pluginWrapper buttonWrapper"><a class="button" href="/docs/get-started">Get Started</a></div></div></div></div></div></div><div><div style="height:90px;background:linear-gradient(to top right,#282c34 0,#282c34 50%,#8668ed 0,#8668ed);"></div></div><div class="mainContainer index"><div class="container"><div class="wrapper"><div class="gridBlock"><div class="blockElement routers-example-column animated slideInUp twoByGridBlock"><div class="blockContent"><div><span><pre><code class="hljs css language-typescript"><span class="hljs-meta">@Injectable</span>();
<span class="hljs-meta">@Controller</span>(<span class="hljs-string">'dogs'</span>)
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> DogsController {
<span class="hljs-keyword">constructor</span>(<span class="hljs-params"><span class="hljs-keyword">private</span> dogsService: DogsService</span>) {}
<span class="hljs-meta">@Post</span>(<span class="hljs-string">'/'</span>, [DogsValidator])
<span class="hljs-keyword">public</span> <span class="hljs-keyword">async</span> createDog(req: Request) {
<span class="hljs-keyword">const</span> <span class="hljs-keyword">await</span> newDog = <span class="hljs-keyword">this</span>.dogsService.create(req.body);
req.sendResponse(newDog, HTTP_STATUS.CREATED);
}
<span class="hljs-meta">@Get</span>(<span class="hljs-string">'/:id'</span>, [CacheMiddleware])
<span class="hljs-keyword">public</span> <span class="hljs-keyword">async</span> getById(req: Request) {
<span class="hljs-keyword">const</span> dog = <span class="hljs-keyword">await</span> <span class="hljs-keyword">this</span>.dogsService.getById(req.params.id);
req.sendResponse(dog, dog ? HTTP_STATUS.OK : HTTP_STATUS.NOT_FOUND);
}
}
</code></pre>
</span></div></div></div><div class="blockElement routers-example-column animated slideInUp twoByGridBlock"><div class="blockContent"><div><span><pre><code class="hljs css language-json">{
<span class="hljs-attr">"data"</span>: {
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"R2 Dog 2"</span>,
<span class="hljs-attr">"breed"</span>: <span class="hljs-string">"robodog"</span>,
<span class="hljs-attr">"owner"</span>: {
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"Anakin Skywalker"</span>
}
},
<span class="hljs-attr">"code"</span>: <span class="hljs-number">200</span>,
<span class="hljs-attr">"metadata"</span>: {
<span class="hljs-comment">// ...</span>
}
}
</code></pre>
</span></div></div></div></div><div class="gridBlock"><div class="blockElement features-about animated fadeIn slow alignCenter threeByGridBlock"><div class="blockContent"><h2><div><span><p>Simplified routing</p>
</span></div></h2><div><span><p>Agio uses Express to provide routing, but brings a simplified way to code routes with decorators that represent HTTP verbs and build the handlers.</p>
</span></div></div></div><div class="blockElement features-about animated fadeIn slow alignCenter threeByGridBlock"><div class="blockContent"><h2><div><span><p>Validators</p>
</span></div></h2><div><span><p>Write efficient validation schemes using the javascript object and use them as middleware to validate any request. They will be validated with Joi.</p>
</span></div></div></div><div class="blockElement features-about animated fadeIn slow alignCenter threeByGridBlock"><div class="blockContent"><h2><div><span><p>Databases</p>
</span></div></h2><div><span><p>Connect your application to MongoDB and many SQL databases. Agio supports multiple databases and uses Mongoose and Sequelize to create and connect models that can be injected using decorators.</p>
</span></div></div></div></div><div class="powered-by"><h2>Powered by community</h2><p>Thank you very much to all open source projects that drive Agio</p></div></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/icon-monochrome.svg" alt="Agio" width="66" height="58"/></a><div><h5>Docs</h5><a href="docs/get-started">Getting Started</a></div><div><h5>CLI</h5><a href="docs/cli">Install</a></div><div><h5>More</h5><a href="https://github.com/">GitHub</a></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2020 Agio</section></footer></div></body></html>