That’s all you need to do to prepare your system. You can install Atom by browsing to and downloading the installer. This guide is written specifically for Atom, but feel free to use another if you wish. My favourite is Atom, which is a simple cross platform editor built using Electron. You can download Chrome from: įinally, if you don’t have one already, you will need to install a code editor. Next, you will want to have the latest version of Google Chrome installed for debugging the Ionic app. Mac OS X / Linux sudo npm install -g cordova Similar to before, use npm to install Cordova globally by running the following command: The -g tells it to install the package globally, and not just in the local directory we are in. There are a lot of dependencies so it may take a few minutes to install. This will use npm (Node Package Manager) to install Ionic. Mac OS X / Linux sudo npm install -g ionic Now once that’s done, let’s install Ionic Framework.įirst, load up Command Prompt (Windows) or Terminal (Mac OS/Linux) and type the following: Then, click on the installer and follow the instructions to install Node.JS. Go to and click on v6.5.0 Current (this may be different in the future, but just choose the one which has “Latest Features” and you should be good). Building the chat client using Ionic Framework which will connect to the server and send/receive messages.Creating the Node.JS server which will accept the connections and forward the messages to other clients.Setting up your system by installing the pre-requisites.The screenshots will be from a Windows machine but it will work equally well on Linux or macOS X. Here is the step-by-step guide to making a multi-client chat with Ionic Framework and Node.JS. I was so amazed I thought I would make a tutorial explaining how to create a multi threaded chat client and server using Ionic and Node.JS. In a few minutes you can do something that used to take hours to figure out. I was amazed at how quickly you can make a multi-threaded network application using Node.JS and the standard JavaScript WebSocket library. But I saw the challenge as an opportunity and quickly learned what I needed to get the job done. To be honest, before taking on this challenge, my Node.JS/Angular experience was sparse at best. It involved an AngularJS front-end with a WebSocket client and a Node.JS server that would accept connections and broadcast the latest scores from a text file. More recently I was tasked with making a real-time scoreboard for a company I’m currently contracting for. First learning how to make one client talk to a server, then figuring out how to make the server handle multiple clients at once and so on… I spent many of my younger years hacking away at the VB6 WinSock API. I was obsessed with making client-server programs that could talk to each other over TCP. I graduated onto making proper network connected applications shortly thereafter. It wasn’t long after that when the easy-to-use GUI drawing feature of Visual Basic 6 had me hooked on programming for good. I first started learning how to code at age 12 when I taught myself how to make basic Windows batch scripts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |