Skip to content

Hello World !

In this tutorial, we will build a website running locally on your computer to experience Emotional Browsing with Mojo Web.

👉   Hello World example, is basic and straightforward to help you catch the concept of Emotional Browsing and start building. For more details on Mojo Web, checkout the Developer Documentation

🎯   If you are already familiar with web development and already know how to run a website, you can jump to the section 🛠   How to configure my website in the Developer Documentation

Ok, let's get everything we need to run this HelloWorld.

✓   Requirements

To run this example you will need:

  • Your mobile device 📱 and a computer 💻 (the server), both connected to the same local network -- your standard WIFI is perfect for that.
  • Mojo Web installed on your mobile device - How to get access to Mojo Web?
  • Docker installed on your computer - Docker Install

👟   Ready? Go !

1️⃣   Download the Hello World archive : HelloWorld.zip.

This consists of a basic web site architecture, written in HTML. We will feed our web server, a basic NGINX, with these files to bootstrap the Hello World example.

📂 HelloWorld.zip files:

 html
 ├── amused.html
 ├── confused.html
 ├── index.html
 ├── mojo.json
 └── surprised.html

🤩   you, rockstar developer, noticed a special file : mojo.json. This file tells Mojo Web what to do when it detects some emotions. More info on mojo.json ...

2️⃣   Extract this file into your development workspace, for example ~/workspace/mojo_web

3️⃣   Run NGINX server using Docker command

cd ~/workspace/mojo_web
docker run -it --rm -d -p 8080:80 --name mojo_web_demo -v ~/workspace/mojo_web/html:/usr/share/nginx/html nginx

4️⃣   Get your local development machine IP address

5️⃣   Launch Mojo Web on your mobile (connected to the same local network) and navigate to http://<your_computer_ip_address>:8080

🥳   Voilà!

Now that you are navigating the index.html, you can experience Mojo Emotional Browsing Experience, by expressing either amusement, confusion or surprise.

💡   to stop the HelloWorld Docker image, run docker stop mojo_web_demo

🤗   We hope you enjoy!

Please tell us what you build with Mojo Web!

Share ideas and feedbacks with the team.

💌 email us anything about your project : contact at hoomano dot com