Compare commits
5 commits
57628d940d
...
716c5f344c
| Author | SHA1 | Date | |
|---|---|---|---|
| 716c5f344c | |||
| e77704ba03 | |||
| 9a56793399 | |||
| 2879e5d975 | |||
| 780df1e348 |
7 changed files with 83 additions and 7 deletions
10
Cargo.toml
10
Cargo.toml
|
|
@ -1,7 +1,15 @@
|
|||
[package]
|
||||
name = "naas"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "No as a Service - A lightweight HTTP service that always says 'no'"
|
||||
repository = "https://kode.naiv.no/olemd/naas"
|
||||
homepage = "https://kode.naiv.no/olemd/naas"
|
||||
authors = ["Ole-Morten Duesund <olemd@glemt.net>"]
|
||||
keywords = ["http", "service", "api", "no", "rust"]
|
||||
categories = ["web-programming::http-server"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
|
||||
|
|
|
|||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Ole-Morten Duesund
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
@ -156,4 +156,6 @@ podman build --build-arg RUST_VERSION=1.75 -t naas:latest .
|
|||
|
||||
## License
|
||||
|
||||
MIT
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
The MIT License is a permissive license that allows you to do almost anything with this code, including using it in commercial projects, modifying it, and distributing it, as long as you include the original copyright notice.
|
||||
11
debian/changelog
vendored
11
debian/changelog
vendored
|
|
@ -1,3 +1,12 @@
|
|||
naas (1.0.1-1) unstable; urgency=medium
|
||||
|
||||
* Add MIT License for maximum permissivity
|
||||
* Fix Debian package systemd service installation conflict
|
||||
* Update package metadata with license and repository information
|
||||
* Improve README with license documentation
|
||||
|
||||
-- Ole-Morten Duesund <olemd@glemt.net> Mon, 29 Sep 2025 13:00:00 +0200
|
||||
|
||||
naas (1.0.0-1) unstable; urgency=medium
|
||||
|
||||
* Initial release of NaaS (No as a Service)
|
||||
|
|
@ -7,4 +16,4 @@ naas (1.0.0-1) unstable; urgency=medium
|
|||
* Health check endpoint
|
||||
* Systemd service integration
|
||||
|
||||
-- Ole-Morten Duesund <olemd@glemt.net> Fri, 27 Sep 2024 15:00:00 +0200
|
||||
-- Ole-Morten Duesund <olemd@glemt.net> Mon, 29 Sep 2025 13:00:00 +0200
|
||||
2
debian/naas.service
vendored
2
debian/naas.service
vendored
|
|
@ -27,7 +27,7 @@ ProtectHome=true
|
|||
ReadWritePaths=
|
||||
|
||||
# Resource limits
|
||||
MemoryLimit=256M
|
||||
MemoryMax=256M
|
||||
CPUQuota=50%
|
||||
|
||||
[Install]
|
||||
|
|
|
|||
4
debian/rules
vendored
4
debian/rules
vendored
|
|
@ -15,6 +15,4 @@ override_dh_auto_clean:
|
|||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
# Install config file
|
||||
install -D -m 644 debian/naas.default debian/naas/etc/default/naas
|
||||
# Install systemd service
|
||||
install -D -m 644 debian/naas.service debian/naas/lib/systemd/system/naas.service
|
||||
install -D -m 644 debian/naas.default debian/naas/etc/default/naas
|
||||
38
src/main.rs
38
src/main.rs
|
|
@ -8,6 +8,14 @@ const SIMPLE_FRONTEND: &str = r#"<!DOCTYPE html>
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>No</title>
|
||||
<!-- Open Graph meta tags for URL sharing -->
|
||||
<meta property="og:title" content="No">
|
||||
<meta property="og:description" content="Just no. That's it.">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="https://via.placeholder.com/1200x630/000000/ffffff?text=No">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="No">
|
||||
<meta name="twitter:description" content="Just no. That's it.">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
|
|
@ -96,6 +104,14 @@ const PLAYGROUND_FRONTEND: &str = r#"<!DOCTYPE html>
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>No as a Service</title>
|
||||
<!-- Open Graph meta tags for URL sharing -->
|
||||
<meta property="og:title" content="No as a Service">
|
||||
<meta property="og:description" content="The API that always says no. Simple, reliable, and always negative.">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="https://via.placeholder.com/1200x630/1a1a2e/ff6b6b?text=NO">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="No as a Service">
|
||||
<meta name="twitter:description" content="The API that always says no. Simple, reliable, and always negative.">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
|
|
@ -210,6 +226,24 @@ const PLAYGROUND_FRONTEND: &str = r#"<!DOCTYPE html>
|
|||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
margin-top: 60px;
|
||||
padding: 20px 0;
|
||||
opacity: 0.6;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.footer a:hover {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
|
||||
.endpoint-info h3 {
|
||||
color: #ff6b6b;
|
||||
margin-bottom: 15px;
|
||||
|
|
@ -286,6 +320,10 @@ const PLAYGROUND_FRONTEND: &str = r#"<!DOCTYPE html>
|
|||
<li><span class="code">GET /health</span> - Health check</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<a href="https://kode.naiv.no/olemd/naas" target="_blank">Source Code</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue