Skip to content

CONCEPT2_What can Netlify do for you

David Jones-Gilardi edited this page Feb 23, 2021 · 19 revisions

πŸ“š What can Netlify do for you

Reading time: ~10 minutes

If you are already familiar with Netlify Serverless functions and just want to move on to the next exercise go to section => βš’οΈ Expose your "hello world" API . Otherwise, read on.

We will cover:

  1. Build, Package, deploy, host
  2. Advanced features
  3. Netlify Functions
  4. Want to learn more

1. Build, Package, deploy, host

We already introduced you the features to Build, Package, deploy and host before to deploy your empty application. Here is the schema:

  • βœ… Configure builds – Netlify can run your build command and deploy the result whenever you push to your Git repo. Get started with basic build settings, learn about managing build dependencies, and explore additional options available with file-based configuration.

  • βœ… Site deploys – Atomic deploys with Netlify guarantee that your site is always consistent. Learn how to manage deploys, enable deploy notifications, and run a branch-based split test.

Template CTRL click

2. Advanced features

You have already seen a first feature of Netlify by creating and deploying a site. This part is called The workflow.

To know more about the sites, here is the documentation.

  • βš™οΈ Monitor sites – Learn how Netlify Analytics lets you monitor trends in site activity. Monitor builds to understand the role individual sites play in your team's builds usage. Explore what kinds of logs and notifications are available for your sites.

.

  • βš™οΈ Domains & HTTP - Register a new domain in the Netlify UI, or use a domain you already own, to assign a custom domain to your site. Either way, you can have Netlify handle DNS management for you. They provide free automatic HTTPS on all sites.

  • βš™οΈ Forms - You can use Netlify Forms without adding API calls or extra JavaScript on your site, configure extra spam prevention beyond our automatic spam filtering, and receive notifications about new submissions.

  • βš™οΈ CLI - You can use Netlify's command line interface to deploy sites or configure continuous deployment. Netlify Dev brings the functionality of your Netlify production environment directly to your local machine.

  • βš™οΈ API - To get started with the Netlify API, learn how to authenticate and make a request. Then explore options for deploying via API and usage for some popular endpoints.

3. Netlify Functions

Source Netlify Documentation

Netlify lets you deploy serverless Lambda functions without an AWS account, and with function management handled directly within Netlify. Your serverless functions are version-controlled, built, and deployed along with the rest of your Netlify site, and we will automatically handle service discovery through our built-in API gateway. This eliminates overhead and brings the power of Deploy Previews and rollbacks to your serverless functions.

Why this is cool ?

What this translates to is an ability to create serverless functions in your application that can be accessed seamlessly in your local environment or via a global CDN (once deployed) without the need for an actual server to deploy code to. Just configure the netlify.toml, create the function, and move on.

How does this work in our application ?

In BattleStax, we configure netlify.toml functions to use the functions folder within our application.

netlify toml config

From there, just drop any functions you intend to be serverless into the functions folder and export a handler.

netlify serverless function

That's it. Once a function is implemented in this fashion it will be deployed as a serverless function both locally and via a global CDN once pushed to Netlify.

netlify functions cloud

4. Want to learn more ?

  • πŸ“„ This document goes into details about implementing serverless functions with Netlify and this tutorial spells it out.

Alrighty, let's do this ourselves in the next exercise. See you there.

🏠 Home

🏁 I - What is the JamStack?

Introduction to the JAMStack Why this is cool ? Introduction to Netlify Want to learn more ? πŸ› οΈ II - Setup and deploy your first app

Create your BattleStax repository Setup Netlify account Summary πŸ› οΈ III - Create your Astra instance

Register and Sign In to Astra Configure and create your database Activate Cassandra awesome πŸ“š IV - What can Netlify do for you

Build, Package, deploy, host Advanced features Netlify Functions Want to learn more πŸ› οΈ V - Expose your "hello world" API

Setup your environment Make a serverless endpoint using Netlify functions Merge back to master Check your deployment in Netlify Summary πŸ“š VI - What are DataStax Astra and Stargate

Introduction to Astra Introduction to Stargate Want to know More πŸ› οΈ VII - Set environment variables in your application

Creating the .env file Explore the API with HTTPie πŸ› οΈ VIII - Set secrets in GitHub for CI/CD

Configure secrets in GitHub Verify your secrets How is this all working ? πŸ› οΈ IX - Set environment variables in Netlify

Set environment variables in Netlify Verify your environment variables Summary πŸ› οΈ X - Implement a CRUD Api in Astra

Creating the insertGame Netlify endpoint Connect to Astra Hook it all together Running TDD tests πŸ› οΈ XI - Verify and Deploy in Netlify

Merge back to master Verify your deployment in Netlify Feel the enormity of your accomplishment Super secret full game option πŸ“š XII - Resources

Clone this wiki locally