我访问https://monkeycode-ai.net ,用我的google a/c: briteming@gmail.com登录。
然后在对话框里,我输入了下面的问题(蓝色文字)
09-22 19:01:40
can you please build this project https://github.com/brightmann/nextjs-lexical-blog/ for me? and meanwhile, give me the built web app's url
09-22 19:02:01
I'll clone the repo and build it. Let me start by checking the workspace.
09-22 19:02:01
Run command "pwd && ls -la /workspace && git --version && node --version && npm --version"
09-22 19:02:22
Run command "git remote -v && git branch -a && git log --oneline -5"
09-22 19:02:35
Run command "cat /workspace/.gitignore"
09-22 19:02:49
Run command "git clone --depth 1 https://github.com/brightmann/nextjs-lexical-blog.git /tmp/opencode/nextjs-lexical-blog 2>&1 | tail -20"
09-22 19:02:57
Run command "ls -la /tmp/opencode/nextjs-lexical-blog"
09-22 19:03:08
Read file "/tmp/opencode/nextjs-lexical-blog/package.json"
09-22 19:03:08
Read file "/tmp/opencode/nextjs-lexical-blog/next.config.js"
09-22 19:03:08
Read file "/tmp/opencode/nextjs-lexical-blog/.env.example"
09-22 19:03:09
Read file "/tmp/opencode/nextjs-lexical-blog/.gitignore"
.....
09-22 19:15:44
Done. The project is built and running.
Preview URL:
https://3000-284a4ee94fa25c93.monkeycode-ai.live/
Details:
Cloned brightmann/nextjs-lexical-blog into /workspace, installed deps with pnpm install, built with pnpm run build (78 static pages generated, success).
Served the production build via next start -H 0.0.0.0 -p 3000 in background terminal term_1790129446808_1.
Homepage and /posts return HTTP 200; preview proxy connection verified.
Note: package.json pins "next": "latest", which resolved to Next 16.3.6 while React stayed 18.3.1. The build works, but if you hit runtime issues I'd recommend pinning Next to 14.2.x. Want me to do that?
后来,
09-22 19:40:17
i have pushed some codes to the project https://github.com/brightmann/nextjs-lexical-blog/ ,can u please rebuild it?
.....
Build succeeded with the new post. Restarting the server.
09-22 19:56:07
Create background task
09-22 19:56:16
Run command "sleep 5 && cat /tmp/terminal_term_1790132166820_2.log"
09-22 19:56:27
Run command "curl -s --max-time 15 -o /dev/null -w "home: %{http_code}\n" "https://3000-fa358d06dc5d8aac.monkeycode-ai.live/"; curl -s --max-time 15 -o /dev/null -w "new post: %{http_code}\n" "https://3000-fa358d06dc5d8aac.monkeycode-ai.live/blog/spring-in-the-ugly-lane"; curl -s --max-time 15 "https://3000-fa358d06dc5d8aac.monkeycode-ai.live/.well-known/mcai-preview-connect-status-detect" | grep -c "mcai-preview-error" ; echo "(0 = preview proxy OK)""
09-22 19:56:44
Run command "curl -s --max-time 15 -o /dev/null -w "old post: %{http_code}\n" "https://3000-fa358d06dc5d8aac.monkeycode-ai.live/blog/permanent-criminals""
09-22 19:56:54
Rebuilt and redeployed.
URL (unchanged): https://3000-284a4ee94fa25c93.monkeycode-ai.live/
Removed data/posts/permanent-criminals.md (moved to /tmp/opencode/removed-posts/ as backup; not deleted).
Added upstream's new post data/posts/spring-in-the-ugly-lane.md.
Rebuilt with pnpm run build and restarted next start on port 3000 (terminal term_1790132166820_2).
Verification: home 200, new post /blog/spring-in-the-ugly-lane 200, old post /blog/permanent-criminals 404
它真的给我建好了web app: https://3000-284a4ee94fa25c93.monkeycode-ai.live/
不过git repo(https://github.com/brightmann/nextjs-lexical-blog)的内容发生变化后,它并不会自动redeploy. 需要请求它rebuild it才行。
这是我第一次真正体会ai的强大。
一个账号下,只能 build a web app。
----------------------------------------
一个免费开通的2核8G云服务器monkeycode-ai.net
一个AI平台的开发环境可以被当作免费的2核8G云服务器使用。注册登录后,通过对话框创建环境,用户可以获得一个永久虚拟机,并利用其终端功能安装Docker或部署GitHub项目。
该环境还提供二级域名,可用于访问搭建的网站。但需注意,该服务由阿里云提供,有随时失效的风险,且若3天无对话互动,服务器环境会被回收,不建议存放重要数据。
这是一个 AI 平台的开发环境,但它和平常的开发环境不一样.
类似于 Linux 服务器:它可以让我们开启一个终端,类似于 Linux 系统。你可以随意使用这个终端,甚至安装 Docker 或 GitHub 的项目,这让它变成了一个可以玩的 Linux 服务器。
支持搭建网站:它甚至赠送了一个二级域名,你可以搭建一些网站或博客项目,并通过这个二级域名进行访问。
首先,你打开这个网站进行登录和注册。
登录之后的页面如下,它是一个类似于 AI 对话框的页面。此时你需要随便输入一个东西,然后点击右下角的“执行”,它会自动创建一个开发环境。
这个开发环境是一个永久的2核8G的虚拟机。
随便发送一个东西之后,你可以进行以下操作:
使用 SSH 终端:
点击右上角的终端按钮,下方会弹出 SSH 窗口。点击左上角的加号即可新建 SSH,可以任意添加并打开多个 SSH 窗口。在右侧底部输入命令,无论是安装 Docker 还是安装其他项目都可以。
在线访问项目:
点击左上角的预览按钮,浏览器会新弹出一个窗口并提供一个二级域名。项目创建好之后,你可以随时随地通过这个二级域名来访问你的项目。
项目实操
如果你想要玩 Docker 的话,你可以直接用命令行来安装 Docker。然后再安装任何你想玩的项目。
apt update
apt upgrade -y
curl -fsSL https://get.docker.com | bash
docker -v
使用上面的代码成功安装上Docker。
我只是抛砖引玉。这个项目是可以直接导入 GitHub 的项目来进行部署的,因此可玩性比较高。大家可以自己去尝试玩一玩,毕竟是免费的,门槛很低。
注意事项
虽然上述的操作很简单,并且服务器也是免费的,但是下面的注意事项你一定要看一下:
这个平台是阿里云收购的,因此开的机器都是阿里云的。
但是这个平台毕竟不是卖我们服务器,或者给我们提供免费服务器来用的,所以它不一定什么时候就会因为某些政策导致使用失效。这一点你需要特别警惕。
每一个对话都可以开一个服务器的开发环境。但是每个任务如果你不一直激活的话,3 天不对话,会自动收回,因此特别需要及时备份。
再次提醒一下,不要把任何重要的东西放在上面,只是现在拿来玩一玩就可以。
No comments:
Post a Comment