This is a chatroom app. You can use it to chat with many people simultaneously.
The app was written in node.js for learning and demo purposes. It uses Google Maps to display a location. The app does not use a database or any other persistent data, it is all in main memory. Refreshing your browser will restart the app.
Using this app
Deploying the app locally
Deployment to Kubernetes on IBM Cloud
Deploy to IBM Cloud Foundry
Deploy app as a Docker container
Start using the app this way:
- Open the app URL in yor browser. If your app is not running yet, deploy it as described in sections below.
- Write your name in the field Display name. Any name works, you don't have to register first.
- Write the name of the chatroom you are joining in field Room. Any room name works, rooms are not defined upfront. However, in order to chat with other people, they must login to the same room as you.
- Press enter.
- You are in the chatroom. On your screen you see:
- Top left: name of your chatroom
- Left: names of people in your chatroom
- Middle: content of your chat
- Bottom middle: input field for your message
- Bottom right: button to share your location with all participants. This will send them the link to your location in Google Maps.
- Download and install node.js on your computer.
- Download and unpack this repo.
- Change current directory to directory with this repo.
- Install all required node packages with command
npm install
- Start the app with command
npm start
- Open the app by typing in your web browser:
localhost:3000
Refer to instructions in file Deployment to Kubernetes on IBM Cloud.
- Do first four steps from previous section.
- Login to IBM Cloud with command
ibmcloud login
- Provide your IBM Cloud account data: email and password.
- Select the region, for example eu-de for Germany
- Connect to your IBM Cloud organisation and work space by typing in
ibmcloud target -o <your_organization -s <your_space>
- Edit the file manifest.yml to provide your unique application name, for example chat-app-yourname
- Deploy the app with command
ibmcloud app push -c "npm start"
The deployment data will be read from the manifest.yml.
You can get the Docker image for this app in one of two ways:
- In Docker hub, pull the image acovid/chat-app
- Build your own image using Dockerfile (see instructions below)
-
Building your own Docker image:
- download this git repo
- in your terminal/command line, unzip the repo
- change current directory to directory with this repo
- delete the node_modules directory, you don't need it in your image
- type in:
docker build -t <your_app_name>:1 .
(Do not forget the dot at the end).
-
Run the container with your app locally:
docker run -d -p <your_port>:3000 chat-app:1
-
In your web browser, access the app at localhost:<your_port>