Build, Run, Debug, and Deploy a Serverless JavaScript Node.js Function from your Local Machine
Tags: javascript, aws, azure, serverless
Published: 2019-09-30 16:15:08

---
title: Build, Run, Debug, and Deploy a Serverless JavaScript Node.js Function from your Local Machine
published: true
description: Use the cross-platform Azure Functions core tools to build, run, and debug serverless JavaScript Node.js functions from the command line or within Visual Studio Code. Then deploy your working function app to the cloud!
tags: javascript, aws, azure, serverless
canonical_url: https://medium.com/microsoftazure/moving-from-lambda-%C6%9B-to-azure-functions-b6d5ed5ca007?part=5
series: Moving from Lambda to Azure Functions
---
> This article is part of [#ServerlessSeptember](https://dev.to/azure/serverless-september-content-collection-2fhb). You'll find other helpful articles, detailed tutorials, and videos in this all-things-Serverless content collection. New articles are published every day — that's right, every day — from community members and cloud advocates in the month of September.

> Find out more about how Microsoft Azure enables your Serverless functions at [https://docs.microsoft.com/azure/azure-functions/](https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=devto-blog-jeliknes).

The previous episode in this series provided a high-level overview of serverless on Azure. This episode looks at cross-platform tools that enable you to build, run, and debug Azure Functions entirely from your local machine before easily deploying them to the cloud.

# Build, Run, Debug and Deploy Azure Functions locally

This episode shows how to use the cross-platform [Azure Functions core tools](https://docs.microsoft.com/azure/azure-functions/functions-run-local?WT.mc_id=devto-blog-jeliknes) to create and run a local serverless project. Use the command or an editor like [Visual Studio Code](https://code.visualstudio.com?WT.mc_id=devto-blog-jeliknes). See how to set a breakpoint, debug, and even modify local variables. Interact with storage using the cross-platform [storage emulator](https://docs.microsoft.com/azure/storage/common/storage-use-emulator?WT.mc_id=devto-blog-jeliknes). Finally, deploy your app to the cloud with just a few clicks.

Watch the episode here:
 
{% youtube 3keA9GXYQDc %}

You can view the source code for the sample app and deploy the migrated code directly to Azure with a single-click in the “AWSMigration” GitHub repository.

{% github JeremyLikness/AWSMigration %}

In the next article, we'll look at advanced concepts like security, identity, and CI/CD.

## Resources

1. [Create your free Azure account](https://azure.com/free?WT.mc_id=devto-blog-jeliknes)
2. [Azure Functions core tools](https://docs.microsoft.com/azure/azure-functions/functions-run-local?WT.mc_id=devto-blog-jeliknes)
3. [Visual Studio Code](https://code.visualstudio.com?WT.mc_id=devto-blog-jeliknes)
4. [Azure Storage Emulator](https://docs.microsoft.com/azure/storage/common/storage-use-emulator?WT.mc_id=devto-blog-jeliknes)
5. [Azure Storage Explorer](https://docs.microsoft.com/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows&WT.mc_id=devto-blog-jeliknes)