forked from oevery/ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MoonBegonia
committed
Jul 26, 2021
0 parents
commit 635180d
Showing
44 changed files
with
5,087 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/node,windows,macos,linux | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=node,windows,macos,linux | ||
|
||
### Linux ### | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
.env.production | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
### Windows ### | ||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/node,windows,macos,linux | ||
|
||
ql | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
*.local |
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,70 @@ | ||
# Ninja | ||
|
||
一次对于 koa2 vue3 vite 的简单尝试 | ||
|
||
## 说明 | ||
|
||
Ninja 仅供学习参考使用,请于下载后的 24 小时内删除,本人不对使用过程中出现的任何问题负责,包括但不限于 `数据丢失` `数据泄露`。 | ||
|
||
Ninja 仅支持 qinglong 2.8+ | ||
|
||
## 特性 | ||
|
||
* 扫码,跳转登录添加/更新 cookie | ||
|
||
## 文档 | ||
|
||
1. 容器映射 5701 端口,ninja 目录至宿主机 | ||
|
||
例: | ||
|
||
```diff | ||
version: "3" | ||
services: | ||
qinglong: | ||
image: whyour/qinglong:latest | ||
container_name: qinglong | ||
restart: unless-stopped | ||
tty: true | ||
ports: | ||
- 5700:5700 | ||
+ - 5701:5701 | ||
environment: | ||
- ENABLE_HANGUP=true | ||
- ENABLE_WEB_PANEL=true | ||
volumes: | ||
- ./config:/ql/config | ||
- ./log:/ql/log | ||
- ./db:/ql/db | ||
- ./repo:/ql/repo | ||
- ./raw:/ql/raw | ||
- ./scripts:/ql/scripts | ||
- ./jbot:/ql/jbot | ||
+ - ./ninja:/ql/ninja | ||
labels: | ||
- com.centurylinklabs.watchtower.enable=false | ||
``` | ||
|
||
2. 进容器内执行以下命令 | ||
|
||
```bash | ||
git clone https://github.com/MoonBegonia/ninja.git /ql/ninja | ||
cd /ql/ninja/backend | ||
pnpm install | ||
pm2 start | ||
``` | ||
|
||
3. 将一下内容粘贴到 `extra.sh` | ||
|
||
```bash | ||
cd /ql/ninja/backend | ||
pm2 start | ||
``` | ||
|
||
## 注意事项 | ||
|
||
* 重启后后务必执行一次 `ql extra` 保证 Ninja 配置成功。 | ||
|
||
* 更新 Ninja 只需要在容器中 `ninja/backend` 目录执行 `git pull` 然后 `pm2 start` | ||
|
||
* Qinglong 需要在登录状态(`auth.json` 中有 token) |
Oops, something went wrong.