-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from francescovallone/develop
Release 0.4.0
- Loading branch information
Showing
75 changed files
with
1,903 additions
and
968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare module '*.vue' { | ||
import { DefineComponent } from 'vue' | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types | ||
const component: DefineComponent<{}, {}, any> | ||
export default component | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:20 as build | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN npm run docs:build | ||
|
||
FROM nginx:alpine | ||
|
||
COPY --from=build /app/.vitepress/dist /usr/share/nginx/html | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<script setup> | ||
const max = 6613; | ||
const scale = (value) => (value / max) * 100 | ||
const scaleStyle = (value) => | ||
`width: ${((value / max) * 100).toFixed(2)}%` | ||
const scalePadding = (value) => | ||
`padding-left: ${((value / max) * 100).toFixed(2)}%` | ||
const format = new Intl.NumberFormat().format | ||
const graphs = [ | ||
{ | ||
title: 'Nest', | ||
lang: 'Node', | ||
value: 6352, | ||
}, | ||
{ | ||
title: 'Shelf', | ||
lang: 'Dart', | ||
value: 6311 | ||
}, | ||
{ | ||
title: 'Dart Frog', | ||
lang: 'Dart', | ||
value: 5875 | ||
}, | ||
{ | ||
title: 'Django', | ||
lang: 'Python', | ||
value: 949 | ||
} | ||
] | ||
</script> | ||
|
||
<template> | ||
<div class="container flex w-full gap-8 flex-row my-8"> | ||
<section class="flex flex-col gap-6 flex-1"> | ||
<h1 class="text-2xl font-bold">Fast 🚀</h1> | ||
<p class="text-xl text-gray-400"> | ||
Serinus is designed to be fast and efficient. It is built on top of the Dart language, which is known for its performance and efficiency. | ||
</p> | ||
<p class="text-xl text-gray-400"> | ||
Here are some benchmarks comparing Serinus with other popular frameworks. | ||
</p> | ||
</section> | ||
<section class="flex flex-col gap-4 flex-1"> | ||
<ol | ||
class="flex flex-col list-none w-full text-gray-500 dark:text-gray-400 text-lg" | ||
> | ||
<li class="flex flex-row items-stretch w-full gap-4"> | ||
<p | ||
class="flex items-end gap-2 w-full max-w-[8em] dark:text-gray-400" | ||
> | ||
Serinus | ||
<span class="text-gray-400 text-xs pb-1"> Dart </span> | ||
</p> | ||
<div class="w-full h-7 relative"> | ||
<div | ||
class="flex justify-end items-center text-sm font-bold text-white h-7 px-2.5 py-0.5 bg-gradient-to-r from-yellow-400 to-orange-500 rounded-full" | ||
> | ||
{{ format(max) }} req/s | ||
</div> | ||
</div> | ||
</li> | ||
<li | ||
v-for="graph in graphs" | ||
class="flex flex-row w-full gap-4" | ||
:key="graph.title" | ||
> | ||
<p | ||
class="flex items-end gap-2 w-full max-w-[8em] dark:text-gray-400" | ||
> | ||
{{ graph.title }} | ||
<span class="text-gray-400 text-xs pb-1"> | ||
{{ graph.lang }} | ||
</span> | ||
</p> | ||
<div class="w-full h-7 relative"> | ||
<div | ||
class="flex justify-end items-center text-sm px-2.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded-full mr-auto h-7" | ||
:style="scaleStyle(graph.value)" | ||
> | ||
<span | ||
v-if="scale(graph.value) > 40" | ||
class="absolute z-1 flex items-center text-sm h-7" | ||
> | ||
{{ format(graph.value) }} | ||
</span> | ||
</div> | ||
<span | ||
v-if="scale(graph.value) <= 40" | ||
class="absolute top-0 flex items-center text-sm h-7 left-2" | ||
:style="scalePadding(graph.value)" | ||
> | ||
{{ format(graph.value) }} | ||
</span> | ||
</div> | ||
</li> | ||
</ol> | ||
<p class="results text-gray-400 text-xs pb-1">Measurement in Requests per Second. Results from <a href="https://sharkbench.dev/web" target="_blank">sharkbench.dev</a>.</p> | ||
</section> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
p { | ||
margin: 0; | ||
} | ||
.results{ | ||
line-height: 1rem; | ||
} | ||
ol { | ||
padding: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup> | ||
import Fast from './fast.vue' | ||
import Modular from './modular.vue' | ||
</script> | ||
|
||
<template> | ||
<div class="my-32 border-t border-gray-600"> | ||
<Fast /> | ||
<Modular /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<script setup> | ||
const plugins = [ | ||
{ | ||
title: 'Serve Static', | ||
pub: 'https://pub.dev/packages/serinus_serve_static', | ||
desc: 'Serve static files from your Serinus server.', | ||
gh: 'https://github.com/serinus-nest/serve_static', | ||
link: '/plugins/serve_static', | ||
}, | ||
{ | ||
title: 'Config', | ||
pub: 'https://pub.dev/packages/serinus_config', | ||
desc: 'Access .env files and environment variables with ease.', | ||
gh: 'https://github.com/serinus-nest/serinus_config', | ||
link: '/plugins/configuration', | ||
}, | ||
] | ||
</script> | ||
|
||
<template> | ||
<div class="container flex w-full gap-8 flex-col my-8"> | ||
<div class="container flex w-full gap-8 flex-row"> | ||
<section class="flex flex-col gap-6 flex-1"> | ||
<h1 class="text-2xl font-bold">Modular 📦</h1> | ||
<p class="text-xl text-gray-400"> | ||
Serinus is designed to be modular and extensible. It allows you to create your own modules and plugins to extend its functionality. | ||
</p> | ||
<p class="text-xl text-gray-400"> | ||
Here are some of the plugins that are available for Serinus | ||
</p> | ||
</section> | ||
<section class="flex flex-col gap-4 flex-1"> | ||
<a v-for="plugin in plugins" :key="plugin.title" class="plugin transition-all bg-neutral-900 p-4 rounded-lg" :href="plugin.link"> | ||
<div class="flex justify-between items-center"> | ||
<p class="text-lg">{{ plugin.title }}</p> | ||
<div class="flex gap-2"> | ||
<a class="text-gray-400 text-sm" :href="plugin.pub">Pub</a> | ||
<a class="text-gray-400 text-sm" :href="plugin.gh">GitHub</a> | ||
</div> | ||
</div> | ||
<p class="text-gray-400">{{ plugin.desc }}</p> | ||
</a> | ||
</section> | ||
</div> | ||
<div class="flex justify-center" style="flex-shrink: 0; padding: 6px"> | ||
<a href="/plugins/" class="vp-btn-custom"> | ||
View all plugins | ||
</a> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
p { | ||
margin: 0; | ||
} | ||
.results{ | ||
line-height: 1rem; | ||
} | ||
ol { | ||
padding: 0; | ||
} | ||
.vp-doc a{ | ||
text-decoration: none; | ||
} | ||
.plugin { | ||
border: 1px solid transparent; | ||
} | ||
.plugin:hover { | ||
border: 1px solid var(--vp-c-brand-2); | ||
} | ||
</style> |
Oops, something went wrong.