Livestream Event: Build a REST API using Fastify & HarperDB
Tags: javascript, webdev, tutorial, node
Published: 2021-01-19 18:29:30

###Join HarperDB & top Fastify maintainer, Ethan Arrowood, for this [live code along event](https://www.youtube.com/watch?v=5pVA7R48Od0)!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/svyck3kjiih4bxy1a6fm.jpg)

###Fastify: The fast & low overhead web framework for Node.js

HarperDB hosted Ethan Arrowood, a top open source maintainer for Fastify and Microsoft Engineer, for a [virtual livestream on January 26th](https://www.youtube.com/watch?v=5pVA7R48Od0). Ethan built a REST API using Fastify with HarperDB. Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture.

Ethan highlighted best practices for general data organization, running HarperDB in Fastify, using Undici to make high throughput requests to HarperDB, and building an API in Fastify. For the demo, Ethan ran HarperDB locally in a Docker container, so you can do the same or you can spin up a [HarperDB Cloud](https://studio.harperdb.io/sign-up?code=FASTIFYEVENT&utm_source=devto&utm_medium=margopost) instance. You can access and manage either/both through the [Management Studio](https://studio.harperdb.io/sign-up?code=FASTIFYEVENT&utm_source=devto&utm_medium=margopost). All the resources you need to code along are below:

* __[Watch the workshop](https://www.youtube.com/watch?v=zc5VM01_pxo)__
* __[Register for the HarperDB Studio](https://studio.harperdb.io/sign-up?code=FASTIFYEVENT&utm_source=devto&utm_medium=margopost) (free)__
* __[GitHub Repo](https://github.com/Ethan-Arrowood/harperdb-fastify-demo/tree/start)__
* __[HarperDB Docker Container](https://hub.docker.com/r/harperdb/hdb)__

__This event is for developers of any skill level, and will help you strengthen your Fastify and app development skills, as well as general database / data management knowledge.__ (You'll also be able to see some sweet new HarperDB features in action like [JWT Authentication](https://harperdb.io/developers/documentation/security/jwt-authentication/)!)
____
<br>

<br>
###Meet Ethan

@ethanarrowood is a Software Engineer 2 at Microsoft, based out of Boston, MA. Apart from his professional work, Ethan is an active Node.js open source community member. He is a maintainer for Fastify, contributor to Node.js and Undici, and is involved in many other community-related aspects. In addition, he enjoys the outdoors and can often be found hiking, climbing, and skiing around the Northeast.

###Meet HarperDB 

[HarperDB](harperdb.io?utm_source=devto&utm_medium=margopost) is a distributed database focused on making data management easy. It has an easy to use REST API, and supports NoSQL and SQL including joins. HarperDB leverages standard interfaces so that you can use the reporting and analysis tools that best meet your needs. Great for use cases where you need rapid application development, integration, edge computing, distributed computing, and real-time operational analytics. If you want to learn more before the event, you can check out the SDK's in the [HarperDB Marketplace](https://studio.harperdb.io/resources/marketplace/active?utm_source=devto&utm_medium=margopost), read about [HarperDB's technology](https://dev.to/harperdb/building-a-database-written-in-node-js-from-the-ground-up-2hgm), or [read our other articles](https://dev.to/harperdb). 

###Meet Fastify

[Fastify](https://www.fastify.io/) is a fast and low overhead web framework for Node.js. It's inspired by Hapi and Express, and is one of the fastest web frameworks in town. Fatify lists its core features as:
* _Highly performant: super fast, depending on the code complexity we can serve up to 30 thousand requests per second._
* _Extendible: Fastify is fully extensible via its hooks, plugins and decorators._
* _Schema based: even if it is not mandatory we recommend to use JSON Schema to validate your routes and serialize your outputs, internally Fastify compiles the schema in a highly performant function._
* _Logging: logs are extremely important but are costly; we chose the best logger to almost remove this cost, Pino!
Developer friendly: the framework is built to be very expressive and to help developers in their daily use, without sacrificing performance and security._
* _TypeScript ready: we work hard to maintain a TypeScript type declaration file so we can support the growing TypeScript community._

Fun fact - Jaxon, our VP of Product, recently mentioned that HarperDB currently uses Express for our internal API, but we're ripping it out and replacing it with Fastify. Our internal benchmarks say this will increase API performance by at least 50%, but we're hoping for double that. 


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/whgo3vnu6dw5yxylfdyo.jpg)