Development Setup - HolmanA/cat-chat GitHub Wiki
*In order to develop applications using GroupMe's public API (Cat Chat or otherwise), you must have an active GroupMe account. This account must also be registered as a GroupMe developer.
Javascript runtime environment
npm (comes with Node.js)
Node Package Manager. Used to install and maintain Node packages.
Redux Devtools Chrome Extension (optional)
This is an extremely useful Chrome extension allowing developers to view application state, dispatched actions, and a wide range of other relevant application data. Since Cat Chat makes heavy use of NGXS, an Angular state-management library, all state information is captured by this Chrome extension. I use this constantly during development to ensure all portions of the application are interacting as intended.
Visual Studio Code (optional)
Any text editor will work, however VS Code has a solid set of features out of the box that make it particularly useful in developing Angular applications.
By registering as a GroupMe developer, you gain access to a host of features useful for developing applications and bots. More importantly, you gain the access to read your GroupMe access token directly. Using your access token directly allows you to bypass authentication; a valuable time saver when frequently re-launching the application in a development environment.
Copy the file src/environments/environment.ts
and rename it to environment.dev.ts
. Insert your GroupMe access token into the empty authToken
value.
That's it! You're configured to bypass authentication and ready to move on to installing node modules.
Cat Chat depends on a large number of 3rd-party Node modules. To install all required modules, run the command
npm install
while in the project root directory.
Compiling Cat Chat with all development configurations and running the application locally is as simple as executing
ng serve --configuration=dev --watch
while in the project root directory. This will create a local Angular server running on http://localhost:4200/ . Since you added your authentication token to environment.dev.ts
, the application will bypass authentication and bring you straight to the Cat Chat homepage. By including the --watch
flag, the local Angular server will look for any modifications to the applications source files, automatically compiling and serving whenever source changes are detected. Visit http://localhost:4200/ to use Cat Chat locally!