mirror of
https://github.com/hotheadhacker/no-as-a-service.git
synced 2026-04-29 23:27:56 -05:00
Merge branch 'main' into patch-1
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
assets/
|
||||
.dockercontainer.json
|
||||
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM docker.io/node:22-alpine
|
||||
ENV NODE_ENV=production
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install --omit=dev && npm cache clean --force
|
||||
COPY . .
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "start"]
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 hotheadhacker
|
||||
|
||||
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.
|
||||
@@ -146,7 +146,12 @@ Here are some projects and websites that creatively integrate [no-as-a-service](
|
||||
6. **[How About No?](https://github.com/lloyd094/How-About-No-)**
|
||||
A basic GUI using no-as-a-service as the backend. Built with docker in mind.
|
||||
|
||||
7. **[Your Project Here?](https://github.com/YOUR_REPO)**
|
||||
7. **[no-as-a-service-asp](https://github.com/sapph42/no-as-a-service)**
|
||||
A straight-forward implementation of NaaS in ASP.NET Core
|
||||
8. **[No as a Service - Raycast Extension](https://www.raycast.com/nedini/no-as-a-service)**
|
||||
Get a random No from within Raycast. Just install the extension from the Raycast store, open Raycast, then type in 'Random No'. Raycast extension: [No as a Service](https://www.raycast.com/nedini/no-as-a-service).
|
||||
|
||||
9. **[Your Project Here?](https://github.com/YOUR_REPO)**
|
||||
If you're using no-as-a-service in your project, open a pull request to be featured here!
|
||||
|
||||
---
|
||||
|
||||
2
index.js
2
index.js
@@ -1,8 +1,10 @@
|
||||
const express = require('express');
|
||||
const cors = require("cors");
|
||||
const rateLimit = require('express-rate-limit');
|
||||
const fs = require('fs');
|
||||
|
||||
const app = express();
|
||||
app.use(cors());
|
||||
app.set('trust proxy', true);
|
||||
const PORT = process.env.PORT || 3000;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"author": "hotheadhacker",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.18.2",
|
||||
"express-rate-limit": "^7.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user