-
Book Overview & Buying
-
Table Of Contents
Opa Application Development
By :
To begin developing our chat application, we need to create an Opa project using the following Opa command:
opa create chat
This command will create an empty Opa project. Also, it will generate the required directories and files automatically with the structure as shown in the following screenshot:

Let's have a brief look at what these source code files do:
controller.opa: This file serves as the entry point of the chat application; we start the web server in controller.opa
view.opa: This file serves as an user interface
model.opa: This is the model of the chat application; it defines the message, network, and the chat room
style.css: This is an external stylesheet file
Makefile: This file is used to build an application
As we do not need database support in the chat application, we can remove --import-package stdlib.database.mongo from the FLAG option in Makefile. Type make and make run to run the empty application.
Change the font size
Change margin width
Change background colour