Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 925 Bytes

testing-app-with-local-viewer.md

File metadata and controls

35 lines (25 loc) · 925 Bytes

Testing the Application Inside a Local Viewer

To test your app, you can install the NEAR Social Local Viewer CLI. It will allow you to execute and test your BOS Component locally using all the Discovery API resources without any problem.

1 - Install NEAR Social Local Viewer CLI using npm or yarn:

# npm
npm install near-social-local-viewer --save-dev

# yarn
yarn add near-social-local-viewer -D

2 - Now you can create a script within package.json file:

{
  "scripts": {
    "start:widget": "npx init-viewer path/to/widgets/"
  }
}

3 - or just run:

npx init-viewer path/to/widgets/

# e.g: npx init-viewer widgets/

4 - Once your BOS Component is ready, you can deploy it to Near Social:
4.1 - You can deploy it by copying and pasting;
4.2 - Or using near-social CLI.