In this chapter we will deploy example-hello as a website, check it, and open our page in the browser. By the end, Nextweb will be serving the page we wrote.
We're in the shell we opened from the nextweb-tour folder.
Deploy it
These are the three steps we used for WordPress, with our own package in its place:
deploy hello to hello.example.com using example-helloSite "hello" registered for hello.example.com (template: example-hello).
Site root: /home/you/nextweb-tour/nextweb_server/sites/hello
Runs: /home/you/nextweb-tour/nextweb_server/pkg/app/example-hello
Status: pending, commit and apply to start it
Next steps:
commit "Deploy hello"
apply
verify hellocommit "Deploy hello"Committed: Deploy hello
Configuration validated.
Configuration written.apply -yApplying configuration...
Applying site configuration...
Site: hello (hello.example.com)
Allocated site listen port 4004 for hello
example-hello 0.1.0 runs from /home/you/nextweb-tour/nextweb_server/pkg/app/example-hello
Service hello: running example-hello 0.1.0 (manage with "service hello status" / "service hello restart")
Visit: http://127.0.1.10:4004/
Site apply complete.
Configuration changes complete!
Changes 1, Warnings 0, Errors 0
┌──────────────────────────────────────────────────────────┐
│ hello is live → http://127.0.1.10:4004/ │
│ verify: passed · applied in 1.6 s │
└──────────────────────────────────────────────────────────┘
Next steps:
verify hello
service logs helloNextweb picked a port, started app.js with Node.js, checked that it answers, and handed us its address. The address and port on your screen may be different. How a deploy works explains what each step did.
Check it
verify helloVerifying site: hello
state.json (domain: hello.example.com, status: applied)
package: example-hello 0.1.0
HTTP check passed (200)
Visit: http://127.0.1.10:4004/
All checks passed.The HTTP check is the site.verify entry from our .nextwebrc. Your application on Nextweb says where the application's output goes and where it can keep files of its own.
Open it
Open the Visit address in a browser on this computer. The page says:
Hello from Example CompanyWhat we have now
A website running our own package, built and published by us. Next, we'll share the package with a team and a second server.