Skip to content

Instantly share code, notes, and snippets.


ThomasPe/app.js Secret

Created September 8, 2020 08:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
IdentityTranslationModule init
ModuleClient.fromEnvironment(Transport, function (err, moduleClient) {
if (err) {
throw err;
} else {
moduleClient.on('error', function (err) {
throw err;
// connect to the Edge instance (err) {
if (err) {
throw err;
} else {
console.log('IoT Hub module client initialized');
const simulatedTemperatureClientConnectionString = process.env.simulatedTemperatureClientConnectionString;
if (simulatedTemperatureClientConnectionString) {
console.log("Device Connection string", simulatedTemperatureClientConnectionString);
simulatedTemperatureClient = DeviceClient.fromConnectionString(simulatedTemperatureClientConnectionString, Transport);
else {
console.log("Please configure the device connection string in environment variables");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment