跳到主要內容

[教學] Mojito 安裝與入門,install mojito for beginner.

mojito,最近終於從 YDN 對外公開此專案,這個套件主要用於解決前端多重裝置及瀏覽器端的問題,後端服務採取 node.js ,因此使用上必定要先準備以下幾個元素

準備素材

  • c++ complier
  • git
  • Node.js > 0.4.x
  • NPM > 1.0.x

安裝方式

git clone git://github.com/yahoo/mojito.git
cd mojito/source
sudo npm install -g .
npm install .
以上四個簡單的步驟,就可以把 mojito module 完整安裝到服務器上,接著就可以開始進入 mojito 的世界

使用方式

mojito 提供了完整的 command line 給開發者使用,接著先建立一個基本 hello world 專案,跟著以下步驟完成第一個專案。首先建立一個 mojito application,
mojito create app hello
cd hello
切換到目錄之後,再接著建立自己的 mojit,這邊的 mojit 就像是一個應用(application)可能會包含許多個獨立網站體,擁有獨立架構的 MVC ,包含內部設定等,詳細資料可以參考官方的說明,建立 mojit
mojito create mojit HelloMojit
輸入指令後,會看到顯示結果如下,
creating mojit called 'HelloMojit'
(using "default" archetype)
✔ mojit: HelloMojit created!
✔ mojito done.   
接著修改 application.json 這個 mojit 設定檔案,讓剛才新建立的 hellp application 指定底下有一個 mojit -> HelloMojit ,讓應用可以去執行 mojit controller ,修改如下,
[
  {
    "settings": [ "master" ],
    "appPort": 8666,
    "specs": {
      "hello": {
        "type": "HelloMojit"
      }
    }
  }
]
再修改 route.json ,指定應用的路徑會執行哪一個 controller ,修改如下,
[
  {
    "settings": [ "master" ],
    "hello index": {
      "verbs": ["get"],
      "path": "/",
      "call": "hello.index"
    }
  }
]

啟動 mojito 服務器

最後啟動 mojito 服務器,
mojito start
開啟瀏覽器,檢查是否執行正確
http://localhost:8666/
會顯示結果如下,
status
    Mojito is working.
data
    some: data    
恭喜,完成了第一個 mojito 應用程式。

後記

Yahoo 這次公開的 mojito 專案,是目前看起來架構、文件都是最完整的,同時也有提到可以透過 mojito 建構出多種不同裝置適用的 web app,同時裡面包含了 jslint, js compressor, l10n 等讓開發者可以透過 mojito 滿足許多需求,當然 mojito 也是可以融合 YUI 使用。
Node.JS 發展至今,加上其他開發者的投入,已經讓 JavaScript 這個語言在 web 有了不同的角色,橫跨前後端服務。

工商服務

體會 JavaScript 的優點、美好,歡迎關注 JSDC,台灣 JavaScript 盛會即將展開!


留言

  1. Howdy! Someeone іnn my Myspace group shared this site with us so
    I came to give it a looκ. I'm definitely enjoying the
    information. I'm book-marking aոd will bbe tweeting hіs to my followers!
    Great blog and wonderful stylee and design.

    My blog post; best Baby monitors uk 2012

    回覆刪除
  2. Back to year 2010, we may have experienced some
    of our friends being layoff by the company and jobless to get a period of time.
    However, you must be careful when using such codes.
    After returning recently from Portabelo, Panama where the renowned pirater
    expert and adventurer had the opportunity to dive on
    and study several shipwrecks involved in Sir Francis Drake's burial at sea, (
    Croce will speak about his adventures and the journeys of the pirates of St.

    com friends inbox me that she what food was in typically the U.
    Once you have look at this article you will not have to deal with
    your traffic worries anymore. I believe that it can be done without the
    check, if you keep talking to the two of them.
    Among the most common methods are stealing passwords, email hacking and
    phishing.

    my webpage - pirater facebook gratuitement 2014 - facebook decryptor

    回覆刪除
  3. WOW just what I was searching for. Came here by searching for

    Also visit my webpage: bistro md diet

    回覆刪除
  4. Speaking tom is now available via Intel Appup, which make every thing simple and hassle totally free to get it.
    Here are the steps used to get talking tom to Computer.
    The query is, do carriers lose cash on these offers.

    Feel free to visit my webpage - kik setup for pc (http://testdrivinglife.blogspot.nl/)

    回覆刪除
  5. Very good article! We are linking to this particularly great content
    on our website. Keep up the good writing.

    Look into my blog post :: Meska-apteka.pl

    回覆刪除
  6. I am really grateful to the holder of this weeb site who has shared this enormous piece of writing at at this time.


    Review my blog what is tinnitus a symptom of

    回覆刪除
  7. Why viewers still mae use of to read news papers when inn this technological globe all iis existing on net?


    mypage - marketing

    回覆刪除
  8. I read this article fully concerning the difference of most recent and earlier
    technologies, it's remarkable article.

    my web page plumber snake Avondale

    回覆刪除
  9. Hi there, just became alert to your blog through Google, and found that it is truly
    informative. I am going to watch out for brussels.
    I will be grateful if you continue this in future.

    Many people will be benefited from your writing. Cheers!



    Feel free to visit my blog; http://www.ashrafit.Com

    回覆刪除
  10. Thank you for every other fantastic post. Where else could anybody get that type of info in such
    an ideal means of writing? I have a presentation subsequent week, and
    I'm at the look for such information.

    My homepage; meal plans for weight loss

    回覆刪除
  11. Justin Bieber Kisses Selena Gomez at 2011 MTV VMAs. Mobile Holidays Examiner is interesting while sharing traditional
    and bizarre holidays, food holidays along with history and trivia about fun holidays throughout the year.
    He is the man behind Girls Gone Wild, and Kim is
    at his home for the second time this summer.


    Here is my web blog :: Kim Kardashian Hollywood
    Hack - kimkardashianhollywoodhack.com -

    回覆刪除

張貼留言

這個網誌中的熱門文章

Vibe Coding:為什麼 Junior 更快上手?Senior 要如何追趕?

現象層面(市場觀察) 最近有篇文章討論 junior & senior 開發者在 AI 時代的角色轉變,非常熱門。 身為 Cympack 產品開發團隊 ,我們也一直關注這個議題,在閱讀這篇文章時觀察到一些有趣的現象,對我們來說,這正好反映出 AI 正在改變開發生態,junior 借力 AI 快速成長、senior 則需要在 「架構思維」 與 「多 agent 協作」 中找到新定位,其中有些啟發(insight) 可以跟大家分享。 為什麼 Junior 更容易上手 vibe coding? 心智負擔低 → Junior 沒有太多傳統 code workflow 的框架包袱 敢於嘗鮮 → Gen Z / 年輕工程師天生習慣用 prompt-based 工具、跟 LLM 互動 少「優雅程式設計」的束縛 → 不太糾結「這樣寫會不會不夠優雅」,反而 embrace 快速迭代、快速出成果 反觀 Senior: 熟悉大型系統設計 有豐富的「工程正統流程」知識(架構設計、測試策略、效能優化、設計模式) 對 AI 生成 code 的品質 / 維護性通常比較保留 部分 10+ 年資深工程師,對 prompt engineering 沒那麼熟練,還在觀望 技能面(未來的關鍵能力) Vibe coding 本質上 = prompt engineering + AI co-pilot 管理能力 能力項目 誰目前比較有優勢? Prompt 撰寫 / AI 互動 Junior 較強(熟悉 chat-based 流程) 系統設計 / 架構把關 Senior 較強 AI 生成 code 驗證 / Bug 察覺能力 Senior 較強(能看出潛在問題) 快速疊代 / Hackathon 式開發 Junior 較強 長期維護性 / 穩定性 Senior 較強 總結 Junior 確實更快適應 vibe coding,並且更習慣以 「chat-based coding」 的工作流開發。 Senior 擁有驗證 AI 產物與系統設計的深度能力,但若不主動練習 vibe coding,長期會逐漸落後於新一波開發潮流。 就如同在 GAI 技術年會分享,希望帶給各位的感受, 『與 AI 協...

Vibe Coding 協作到自建 Dev Agent?從 Claude / Codex 到 OpenHands

過去一年,越來越多工程師開始 把 AI 真正帶進工作流程 。從一開始用 ChatGPT、Claude 來問語法問題,到後來很多人愛上 Cursor,直接在編輯器裡讓 AI 幫忙改 code、補 test case、甚至自動整理 PR。這樣的開發體驗,已經大大改變了我們寫程式的方式。 更現實的是,在很多企業內部、政府單位、或涉及機密資料的專案裡, 其實根本不能直接用 Cursor 或雲端 LLM 工具。   畢竟這些服務通常會把資料傳到雲端模型做處理,萬一專案裡有未公開的技術、敏感客戶資料,或是受限於法規 (像金融、醫療、政府標案) ,直接用雲端 AI 工具就會踩 紅線 。  因此,許多團隊反而更希望 「自己架一套 Dev Agent」 ,可以在內網執行,資料完全掌握在自己手上,該整合的內部工具、該讀的私有 repo、該串的 CI/CD pipeline,全部客製化、安全可控。 這時候,像 OpenHands 這樣的開源 Dev Agent 框架就特別有價值。它的出發點不是單純的 AI 助手,而是讓你能夠打造出一個真的可以跑在自己環境裡、可以理解整個開發流程的 AI 工程師。從建置到部署,從 CLI 操作到瀏覽器查詢, 從多檔案編輯到自動測試,全部都能自己完成,甚至還能針對不同專案調整專屬的工作流。 對很多開始探索 AI 協作開發的團隊來說,這是一條 從 「AI 幫你寫一段程式」,走向「AI 幫你解決一整個任務」 的進化路徑。而且,還是在可控、可自定義、安全的環境裡完成的。 🧩 主要概述 OpenHands 是由 All‑Hands AI 開發的開源「軟體開發代理人平台」,能模仿人類工程師從建立程式、修改程式碼、執行指令,到瀏覽網頁、呼叫 API……等一整套開發流程 它提供雲端(OpenHands Cloud)與本地 Docker 運行版本,用戶能配置 LLM(如 Claude、OpenAI、Gemini…) 📚 核心特性與怎麼使用 代理人的工具能力 支援代碼編輯、命令行、執行環境、網頁瀏覽、API 呼叫—接近人類開發者完整技能。其中 OpenHands Cloud 版本提供 $50 試用額度讓大家方便使用,又或者如果自己本機有 docker 的話,可以自己Local 版本透過 Docker 自架環境。 ...

Google Gemini 全端 AI Agent 快速入門 - 打造「思考」的 AI 助理

一套從搜尋、反思到輸出的全端 AI 代理人範例,讓你看懂什麼叫 Research Agent 在 AI 工具百家爭鳴的今天,大家都在問一個問題: 「我能不能不只問 AI 答案,而是讓它像一位助理一樣,有流程、有反思、還有出處,真正幫我完成一件事?」 Google 最近釋出了一個相當具有指標意義的開源專案 gemini-fullstack-langgraph-quickstart ,正是為了解這個問題而誕生。 這套系統到底是什麼? 這個範例不是傳統 Chatbot,而是展示一個完整的 AI research agent : 它會根據使用者的提問,自動發想搜尋關鍵字、查資料、整合重點,最後給出答案還附上引用來源。背後的邏輯設計得非常扎實,不只是能跑,更是具備可讀性、可擴展性與可商用性。 它的流程大致如下:  1. 使用者輸入問題(例如:「抖音是否影響台灣選舉?」)  2. Gemini LLM 幫你想出關鍵字(不只是照抄問題)  3. 呼叫 Google Search API 抓資料   4. LangGraph 控制流程 → 判斷資料夠不夠 → 若不足,自動補查  5. 整合最終答案,並產生 citation(來源說明) 你可以想像這就像一位實習助理幫你寫報告, 不只輸出一段內容,而是會 去查、會判斷、會補資料,而且說明「我為什麼這樣說」 。 LangGraph 是什麼角色? LangGraph 就是整個 Agent 背後的控制系統 。 用白話講,它幫你定義 AI 每一步要幹嘛、遇到什麼狀況該走哪條路、要不要反思、要不要再查,甚至可以定義條件邏輯與資料流動。 這就不像寫一個單純的 Chat API,而是比較像「把一個流程圖變成可以跑的程式」。 對工程師來說,它提供了從 prompt 到流程控制的設計彈性;對產品設計來說,它讓 AI 有了 「多步驟任務執行」 的能力。 技術架構與使用方式 這整套系統是 Fullstack 架構,前後端都幫你整好了,技術選型也非常實用:   前端:Vite + React + TailwindCSS + Shadcn UI  後端:FastAPI + LangGraph...