Dataswyft API Platform: Developers Docs
WebsiteGitHubSlackLogin
  • About Dataswyft
    • Community & Support
  • Learn about Dataswyft Platform
    • Decentralized Data Servers
    • Personal Data Account
      • HMIC Permissions
      • Namespaces
      • Single Sign-On
    • Data Wallet
      • Data Wallet Canvas and Solutions
      • CheckD Data Wallet: Release Notes
    • Dataswyft One
      • Compute Tools
  • Build on Dataswyft Platform
    • Dataswyft One APIs
      • Data API
        • Filtering, Querying & Transforming Data
        • Data Debit
      • File Storage API
      • Computations API
      • Postman Collection
    • Integrating with Data Wallets
    • Getting Started
      • Quick Start
      • Developers Portal
        • Updating and Submitting an Application
        • Deleting an Application
        • Application Statuses
      • Application Example - React
        • 1. Environment Setup
        • 2. Create Main Structure
        • 3. Main Page & Routing
        • 4. User Authentication
        • 6. CRUD Operations
        • 5. Component Pages
  • Deploy
    • Application Review
    • Rating Assurance & Certification
    • Live Application Ratings
  • Knowledge Base
    • Security Practices
    • FAQ
    • Glossary of Terms
  • Dataswyft
Powered by GitBook
On this page
  • Set up your environment
  • Install Create React App
  • Install HAT-JS

Was this helpful?

  1. Build on Dataswyft Platform
  2. Getting Started
  3. Application Example - React

1. Environment Setup

PreviousApplication Example - ReactNext2. Create Main Structure

Last updated 5 months ago

Was this helpful?

Set up your environment

Make sure your development environment includes and an npm package manager.

To check if you have Node.js installed, run this command in your terminal:

node -v

To confirm that you have npm installed, you can run this command in your terminal:

npm -v

Install Create React App

You'll need to have Node v8.16.0 or Node v10.16.0 or a later version on your machine.

npx create-react-app my-first-hat-app

If you use npm 5.1 or earlier you can't use npx. Instead, install create-react-app globally:

npm install -g create-react-app
create-react-app my-first-hat-app

And you can start by typing:

cd my-first-hat-app
npm start

Then open to see your app.

Testing HATs are configured to support requests from by default. If you run the project locally on a different port, the requests will not come through by the CORS policy.

Install HAT-JS

Now you can install the HAT-JS:

npm install @dataswift/hat-js

You'll need to restart the server every time you install a package using npm. You can use Ctrl + C to stop the server and npm start to start the server.

Node.js
http://localhost:3000/
https://localhost:3000