Skip to main content

Install

Install💾

Instructions

If you are utilizing the Typescript/Javascript SDK there are two primary packages that need to installed. One for your game server (`@hastearcade/server`) and one for your game client (`@hastearcade/client`). Your game can be a single page app (SPA) with a game server or it can be a standard web application like an MVC application. Depending on the use case you may need to install a different package.

The following section describe different types of application configurations and which packages to install from `@hastearcade`.

Table of Contents​

Single Page Application​

The following commands will need to be run in order to utilize the Haste API in your Single Page Application.

  1. npm install @hastearcade/web in your frontend code (React, Vue, Angular, etc).
  2. npm install @hastearcade/server in your server side code (Node.js)

Regular Web Application​

For a regular web application, the @hastearcade/server package will still need to be installed. However, its likely that authentication will be done server side as part of a standard authentication flow. In the Node.js ecosystem, the most common pattern for server side authentication is using Express + Passport.js. Thus, Haste provides a package to facilitate this common pattern.

  1. npm install @hastearcade/haste-express in your code.
  2. npm install @hastearcade/server in your code.

UMD Installion​

Most modern Javascript/Typescript installations utilize a bundler/package manager to facilitate the sharing of third party code. However, if you are not utilzing a package manager for your client side code you can use our UMD package via a <script> tag.

  1. Add <script src="https://unpkg.com/@hastearcade/web/dist/umd/index.js" /> to your site.