Skip to content

☁️ Scaffold sample app - Get started easily with HMKit on Node.js

License

Notifications You must be signed in to change notification settings

Mikkoun/hm-node-scaffold

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This app is a simple npm project that fetches the car engine state. The following is included:

  1. New npm project
  2. HMKit module
  3. HMKit to be initialised with snippet from the Developer Center -> https://high-mobility.com/develop
  4. The example sends a Telematics command to the car to get the engine state

Configuration

Before running the app, make sure to install dependencies with the following command:

$ npm install

Then follow the steps in src/app.js, adding the Client Certificate and Access Token where necessary.

Run the app

To run the app using npm, type the following command:

$ npm start

> @ start /Users/allan/www/hm-node-scaffold
>  node_modules/.bin/babel src -d lib && node --napi-modules lib/index.js

src/app.js -> lib/app.js
src/index.js -> lib/index.js
(node:97243) Warning: N-API is an experimental feature and could change at any time.
Uint8Array [0, 53, 1, 1, 0, 4, 1, 0, 1, 1, 2, 0, 4, 1, 0, 1, 0, 162, 0, 11, 1, 0, 8, 0, 0, 1, 105, 195, 133, 39, 227]
EngineResponse {
  ignition: {
    value: 'on'
  },
  accessoriesIgnition: {
    value: 'off'
  }
}

Windows

When using Windows, start the app with:

$ npm run start-windows

Questions or Comments ?

If you have questions or if you would like to send us feedback, join our Slack Channel or email us at [email protected].

About

☁️ Scaffold sample app - Get started easily with HMKit on Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%