Skip to content

dataswift/dataswift-starter-app-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dataswift JS Starter app

Open a new issue on Github

A simple application showcasing how you can work with Dataswift's PDA, aka HAT Microserver, in a JavaScript app. The purpose of the app is to showcase log in, registration and simple read/write operations. Also you can use it to build your own application on HAT. ​

Getting Started

You can start by either downloading the project or cloning it. ​

Prerequisites

Node 14.16.0
NPM 7.8.0

Installing

Make sure you have Node(You can download it here) and NPM installed by running simple commands to see their current version.

For Node:

node -v

For NPM:

npm -v

Development server

Run npm install or yarn install to install all the required dependencies and then run npm start or yarn start for a dev server.

Then navigate to http://localhost:3000/ to run the app. The app will automatically reload if you change any of the source files.

Testing

In the HAT Starter app you can sign in to an existing testing HAT or you can create a new one.

If you are running the HAT on a localhost you have to pass the Access token as a parameter.

Example:

http://localhost:3000/authentication?token=<Access-Token>

Configuration

You can change the configuration with your application details.

export const appConfig = {
  applicationId: 'testhatapp', // The application ID.
  namespace: 'testhatapp', // The application's namespace.
  hatCluster: '.hubat.net', // The HAT's cluster for the Login. In this case we are using '.hubat.net' for testing purposes.
  hatApiVersion: 'v2.6', // The API version of the HAT. 
  secure: true, // If you want to run the HAT locally, you have to modify this field to 'false'.
};

License

Copyright (C) 2020 Dataswift Ltd

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •