A curious JavaScript developer's practical guide to deep dive into Deno and get the most out of it for building secure web applications Key Features Understand Deno's essential concepts and features Learn how to use Deno in real-world scenarios Use Deno to develop, test, and deploy web applications and tools Book Description Deno is a JavaScript and TypeScript runtime with secure defaults and a great developer experience. With Deno Web Development, you'll learn all about Deno's primitives, its principles, and how you can use them to build real-world applications. The book is divided into three main sections: an introduction to Deno, building an API from scratch, and testing and deploying a Deno application. The book starts by getting you up to speed with Deno's runtime and the reason why it was developed. You'll explore some of the concepts introduced by Node, why many of them transitioned into Deno, and why new features were introduced. After understanding Deno and why it was created, you will start to experiment with Deno, exploring the toolchain and writing simple scripts and CLI applications. As you progress to the second section, you will create a simple web application and then add more features to it. This application will evolve from a simple 'hello world' API to a web application connected to the database, with users, authentication, and a JavaScript client. In the third section, the book will take you through topics such as dependency management, configuration and testing, finishing with an application deployed in a cloud environment. By the end of this web development book, you will become comfortable with using Deno to create, maintain, and deploy secure and reliable web applications. What you will learn Understand why you should use Deno Get to grips with tooling and the Deno ecosystem Build Deno web applications using existing Node.js knowledge and the newest ECMA Script 6 features Explore the standard library and the benefits of Deno's security model Discover common practices and web frameworks to build a REST API in Deno Structure a web application using common architecture practices Test and deploy a Deno application in the cloud using Docker Who this book is for This book is for web developers who want to leverage their JavaScript and TypeScript skills in a secure, simple, and modern runtime, using Deno for web app development. Beginner-level knowledge of Node.js is recommended but not required. Table of Contents What is Deno? The Toolchain The Runtime and Standard Library Building a Web Application Adding Users and Migrating to Oak Adding Authentication and Connecting to the Database HTTPS, Extracting Configuration, and Deno in the Browser Testing - Unit and Integration Deploying a Deno Application What's Next? Cover Title Page Copyright and Credits Dedication Foreword Contributors Table of Contents Preface Section 1: Getting Familiar with Deno Chapter 1: What is Deno? A little history Handling I/O Node.js enters the scene Why Deno? Presenting Deno A web browser for command-line scripts Architecture and technologies that support Deno Inspiration from POSIX systems Architecture Grasping Deno's limitations Not as stable as Node Better HTTP latency but worse throughput Compatibility with Node.js TypeScript compiler speed Lack of plugins/extensions Exploring use cases A flexible scripting language Safer desktop applications A quick and complete environment to write tools Running on embedded devices Generating browser-compatible code Full-fledged APIs Summary Chapter 2: The Toolchain Technical requirements Setting up the environment Installing Deno Installing VS Code Shell completions Hello World Debugging code in Deno Modules and third-party dependencies Locally cached dependencies Managing dependencies Import maps Inspecting modules Exploring the documentation Running and installing scripts Installing utility scripts Permissions Using the test command Filtering tests Fail fast Formatting and linting Formatting Lint Bundling code Compiling to a binary Using the upgrade command Summary Chapter 3: The Runtime and Standard Library Technical requirements The Deno runtime Stability Program lifecycle Web APIs Exploring the Deno namespace Building a simple ls command Using dynamic permissions Using the filesystem APIs Using buffers Reading and writing from Deno.Buffer Using the standard library Adding colors to our simple ls Building a web server using the HTTP module Summary Section 2: Building an Application Chapter 4: Building a Web Application Technical requirements Structuring a web application Deno as an unopinionated tool The most important part of an application What is our application about? Understanding folder structure and application architecture Developing the business logic Developing the data accessing logic Creating the web server Wiring the web server to the business logic Exploring Deno HTTP frameworks What alternatives exist? The verdict Summary Chapter 5: Adding Users and Migrating to Oak Technical requirements Managing dependencies and lock files Using a centralized dependency file Creating a lock file Writing a web server with Oak Adding event listeners to an Oak application Handling routes in an Oak application Connecting the router to the application Adding users to the application Creating the user module Storing a user in the database Creating the user repository Creating the register endpoint Wiring the user controller with the web layer Summary Chapter 6: Adding Authentication and Connecting to the Database Technical requirements Using middleware functions How does middleware work? Adding request timing via middleware Adding request logging via middleware Adding authentication Creating the login business logic Creating the login endpoint Adding authorization with JWT Returning a token from login Making an authenticated route Connecting to MongoDB Creating a User MongoDB repository Installing the MongoDB client library Developing the MongoDB repository Connecting the application to MongoDB Connecting to a MongoDB cluster Summary Chapter 7: HTTPS, Extracting Configuration, and Deno in the Browser Technical requirements Enabling CORS and HTTPS Enabling CORS Enabling HTTPS Extracting configuration and secrets Creating a configuration file Accessing secret values Running Deno code in the browser Summary Section 3: Testing and Deploying Chapter 8: Testing – Unit and Integration Technical requirements Writing your first test in Deno Defining a test A unit test for MuseumController Writing an integration test Testing the web server Creating integration tests for the application Testing the application together with the API client Benchmarking parts of the application Summary Chapter 9: Deploying a Deno Application Technical requirements Preparing the environment for the application Creating a Dockerfile for the Deno application Running a Terminal inside a container Building and running the application in Heroku Creating the application in Heroku Building and running the Docker image Configuring the application for deployment Getting the application port from the environment Summary Chapter 10: What's Next? Looking back at our journey Deno's roadmap Deno's future and community Interesting things happening in the community Publishing a package to Deno's official registry Summary Why subscribe? About Packt Other Books You May Enjoy Index **A curious JavaScript developer's practical guide to deep dive into Deno and get the most out of it for building secure web applications** * Understand Deno's essential concepts and features * Learn how to use Deno in real-world scenarios * Use Deno to develop, test, and deploy web applications and tools Deno is a JavaScript and TypeScript runtime with secure defaults and a great developer experience. With Deno Web Development, you'll learn all about Deno's primitives, its principles, and how you can use them to build real-world applications. The book is divided into three main sections: an introduction to Deno, building an API from scratch, and testing and deploying a Deno application. The book starts by getting you up to speed with Deno's runtime and the reason why it was developed. You'll explore some of the concepts introduced by Node, why many of them transitioned into Deno, and why new features were introduced. After understanding Deno and why it was created, you will start to experiment with Deno, exploring the toolchain and writing simple scripts and CLI applications. As you progress to the second section, you will create a simple web application and then add more features to it. This application will evolve from a simple 'hello world' API to a web application connected to the database, with users, authentication, and a JavaScript client. In the third section, the book will take you through topics such as dependency management, configuration and testing, finishing with an application deployed in a cloud environment. By the end of this web development book, you will become comfortable with using Deno to create, maintain, and deploy secure and reliable web applications. * Understand why you should use Deno * Get to grips with tooling and the Deno ecosystem * Build Deno web applications using existing Node.js knowledge and the newest ECMA Script 6 features * Explore the standard library and the benefits of Deno's security model * Discover common practices and web frameworks to build a REST API in Deno * Structure a web application using common architecture practices * Test and deploy a Deno application in the cloud using Docker This book is for web developers who want to leverage their JavaScript and TypeScript skills in a secure, simple, and modern runtime, using Deno for web app development. Beginner-level knowledge of Node.js is recommended but not required. 1. What is Deno? 2. The Toolchain 3. The Runtime and Standard Library 4. Building a Web Application 5. Adding Users and Migrating to Oak 6. Adding Authentication and Connecting to the Database 7. HTTPS, Extracting Configuration, and Deno in the Browser 8. Testing - Unit and Integration 9. Deploying a Deno Application 10. What's Next? Discover the current landscape of full-stack development and how to leverage modern web technologies for building production-ready React.js applications to deploy on AWS Key Features Understand the architecture of React and single-page applications Build a modern Web API for your SPA using Node.js, Express, and GraphQL Gain a clear and practical understanding of how to build a complete full-stack application Book Description React sets the standard for building high-performance client-side web apps. Node.js is a scalable application server that is used in thousands of websites, while GraphQL is becoming the standard way for large websites to provide data and services to their users. Together, these technologies, when reinforced with the capabilities of TypeScript, provide a cutting-edge stack for complete web application development. This book takes a hands-on approach to implementing modern web technologies and the associated methodologies for building full-stack apps. You'll begin by gaining a strong understanding of TypeScript and how to use it to build high-quality web apps. The chapters that follow delve into client-side development with React using the new Hooks API and Redux. Next, you'll get to grips with server-side development with Express, including authentication with Redis-based sessions and accessing databases with TypeORM. The book will then show you how to use Apollo GraphQL to build web services for your full-stack app. Later, you'll learn how to build GraphQL schemas and integrate them with React using Hooks. Finally, you'll focus on how to deploy your application onto an NGINX server using the AWS cloud. By the end of this book, you'll be able to build and deploy complete high-performance web applications using React, Node, and GraphQL. What you will learn Discover TypeScript's most important features and how they can be used to improve code quality and maintainability Understand what React Hooks are and how to build React apps using them Implement state management for your React app using Redux Set up an Express project with TypeScript and GraphQL from scratch Build a fully functional online forum app using React and GraphQL Add authentication to your web app using Redis Save and retrieve data from a Postgres database using TypeORM Configure NGINX on the AWS cloud to deploy and serve your apps Who this book is for The book is for web developers who want to go beyond front-end web development and enter the world of full-stac.. Learn How To Use Deno, The Secure Javascript And Typescript Runtime Written In Rust, To Write Reliable Web Applications Key Features: Understand Deno's Essential Concepts And Features Learn How To Use Deno In Real-world Scenarios Use Deno To Develop, Test, And Deploy Web Applications And Tools Book Description: Deno Is A Javascript And Typescript Runtime With Secure Defaults And A Great Developer Experience. With Deno Web Development, You'll Learn All About Deno's Primitives, Its Principles, And How You Can Use Them To Build Real-world Applications. The Book Is Divided Into Three Main Sections: An Introduction To Deno, Building An Api From Scratch, And Testing And Deploying A Deno Application. The Book Starts By Getting You Up To Speed With Deno's Runtime And The Reason Why It Was Developed. You'll Explore Some Of The Concepts Introduced By Node, Why Many Of Them Transitioned Into Deno, And Why New Features Were Introduced. After Understanding Deno And Why It Was Created, You Will Start To Experiment With Deno, Exploring The Toolchain And Writing Simple Scripts And Cli Applications. As You Progress To The Second Section, You Will Create A Simple Web Application And Then Add More Features To It. This Application Will Evolve From A Simple 'hello World' Api To A Web Application Connected To The Database, With Users, Authentication, And A Javascript Client. In The Third Section, The Book Will Take You Through Topics Such As Dependency Management, Configuration And Testing, Finishing With An Application Deployed In A Cloud Environment. By The End Of This Web Development Book, You Will Become Comfortable With Using Deno To Create, Maintain, And Deploy Secure And Reliable Web Applications. What You Will Learn: Understand Why You Should Use Deno Get To Grips With Tooling And The Deno Ecosystem Build Deno Web Applications Using Existing Node.js Knowledge And The Newest Ecma Script 6 Features Explore The Standard Library And The Benefits Of Deno's Security Model Discover Common Practices And Web Frameworks To Build A Rest Api In Deno Structure A Web Application Using Common Architecture Practices Test And Deploy A Deno Application In The Cloud Using Docker Who This Book Is For: This Book Is For Developers Who Want To Leverage Their Javascript And Typescript Skills In A Secure, Simple, And Modern Runtime, Using Deno For Web App Development. Beginner-level Knowledge Of Node.js Is Recommended But Not Required. Discover practical recipes to get to grips with Node.js concepts and programming models for delivering a scalable server-side for your applications Key Features Implement practical solutions for scaling, securing, and testing your Node.js web apps effectively Build and deploy scalable microservices architecture with the power of Node.js 14 Discover techniques for debugging and testing Node.js applications Book Description A key technology for building web applications and tooling, Node.js brings JavaScript to the server enabling full-stack development in a common language. This fourth edition of the Node Cookbook is updated with the latest Node.js features and the evolution of the Node.js framework ecosystems. This practical guide will help you to get started with creating, debugging, and deploying your Node.js applications and cover solutions to common problems, along with tips to avoid pitfalls. You'll become familiar with the Node.js development model by learning how to handle files and build simple web applications and then explore established and emerging Node.js web frameworks such as Express.js and Fastify. As you advance, you'll discover techniques for detecting problems in your applications, handling security concerns, and deploying your applications to the cloud. This recipe-based guide will help you to easily navigate through various core topics of server-side web application development with Node.js. By the end of this Node book, you'll be well-versed with core Node.js concepts and have gained the knowledge to start building performant and scalable Node.js applications. What you will learn Understand the Node.js asynchronous programming model Create simple Node.js applications using modules and web frameworks Develop simple web applications using web frameworks such as Fastify and Express Discover tips for testing, optimizing, and securing your web applications Create and deploy Node.js microservices Debug and diagnose issues in your Node.js applications Who this book is for The book is for web developers who have knowledge of JavaScript and want to gain a broad understanding of Node.js concepts for server-side development Deno Web Development is the definitive guide to starting to write, test, and deploy reliable Deno applications. You’ll be able to apply Deno to common use cases from simple command-line interface (CLI) utilities to multi-featured APIs. By the end of this Deno book, you’ll be comfortable with using Deno for real-world web application development. The fourth edition of Node Cookbook covers the latest features and libraries of Node.js 14. With this recipe-based guide, you'll learn how to handle files, build simple web applications, and build your own modules using Node.js. You'll also be able to diagnose problems in your apps, handle security concerns, and deploy your apps to the cloud.