/plushcap/analysis/cockroach-labs/build-a-full-stack-nodejs-app-with-cockroachdb-serverless

Build a Full-Stack Node.js App with CockroachDB Serverless

What's this blog post about?

This article guides developers on how to create a full-stack Node.js app using CockroachDB Serverless, a cloud-based SQL database designed for scalability and resilience. The tutorial begins with setting up the development environment by installing Node.js and creating a new project folder. It then moves on to creating a simple Express.js server and connecting it to a CockroachDB Serverless cluster using Sequelize, an Object-Relational Mapping (ORM) library for Node.js. The app is designed to store and display contact information. The data is stored in a PostgreSQL database managed by CockroachDB Serverless. To handle user input, the tutorial uses Pug templates, which are server-side templating engines that allow developers to create dynamic HTML pages with embedded JavaScript code. The app also includes error handling and deployment on Heroku, a cloud platform for building, running, and managing applications. The final section of the article provides an overview of the complete code used in the tutorial and suggests ways to extend the application further.

Company
Cockroach Labs

Date published
Oct. 21, 2021

Author(s)
Roger Winter

Word count
2058

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.