Hello World
Please follow the steps below to build our first application together.
First, use lzc-cli to create a project named helloworld:
lzc-cli project create helloworldlzc-cli project create helloworldAfter completing initialization according to the prompts, the terminal will output the following:
? Select project build template vue3
? Please enter application ID, such as (helloworld) helloworld
✨ Initializing project helloworld
✨ Initializing LCMD Cloud application
✨ LCMD MicroServer application created successfully!
✨ After the following steps, you can enter container development
cd helloworld
lzc-cli project devshell
⚙️ After entering the application container, execute the following commands:
npm install
npm run dev
🚀 Start application:
Enter the LCMD client launcher page and click the application icon to test the application? Select project build template vue3
? Please enter application ID, such as (helloworld) helloworld
✨ Initializing project helloworld
✨ Initializing LCMD Cloud application
✨ LCMD MicroServer application created successfully!
✨ After the following steps, you can enter container development
cd helloworld
lzc-cli project devshell
⚙️ After entering the application container, execute the following commands:
npm install
npm run dev
🚀 Start application:
Enter the LCMD client launcher page and click the application icon to test the applicationThen execute the following command to enter the container development environment:
cd helloworld
lzc-cli project devshellcd helloworld
lzc-cli project devshellAfter successfully entering the container, the terminal will display the following information:
[info] Starting application deployment
[info] Installation successful!
[info] 👉 Please access https://helloworld.178me.heiyu.space in your browser
[info] 👉 Login with LCMD username and password[info] Starting application deployment
[info] Installation successful!
[info] 👉 Please access https://helloworld.178me.heiyu.space in your browser
[info] 👉 Login with LCMD username and passwordExecute the following commands in the container to start the application:
npm install
npm run devnpm install
npm run devThe frontend service will run on port 3000 of the container:
Local: http://localhost:3000/
Network: http://172.31.0.36:3000/Local: http://localhost:3000/
Network: http://172.31.0.36:3000/At this point, the application service has started. You can click the "helloworld" icon on PC or mobile to see the application's effect on each terminal platform.
A major advantage of LCMD MicroServer is that you only need to write JavaScript once, and we automatically solve the problem of cross-platform operation of applications on 6 operating system platforms: Windows/Linux/macOS/Android/iOS/HarmonyOS, saving developers a lot of time on platform adaptation.
If you want to deploy this Hello World to LCMD MicroServer, you can refer to Building Application.