1. Home
  2. /
  3. Fission
  4. /
  5. Node.js POST JSON Function

Node.js POST JSON Function - Fission Typing CST Test

Loading…

Node.js POST JSON Function — Fission Code

A Node.js HTTP function that echoes JSON POST data.

# fission/demo/node_post.yaml
apiVersion: fission.io/v1
kind: Function
metadata:
	name: echo-node
	namespace: default
spec:
	environment:
		name: nodejs
		runtime: nodejs14
	code:
		inline:
		function: |
		module.exports = async function(context) {
		return { status: 200, body: context.body };
		}
	routes:
		- path: /echo
		method: POST

Fission Language Guide

Fission is a serverless framework for Kubernetes that allows developers to deploy functions quickly without managing infrastructure. It focuses on fast, event-driven, and scalable function execution.

Primary Use Cases

  • ▸Serverless microservices
  • ▸Event-driven functions for Kubernetes apps
  • ▸REST API endpoints
  • ▸Cron-based background jobs
  • ▸Data processing pipelines triggered by messages

Notable Features

  • ▸Zero-configuration deployment
  • ▸Automatic scaling of functions
  • ▸Supports multiple language runtimes
  • ▸Event-driven architecture
  • ▸Integration with Kubernetes ecosystem

Origin & Creator

Fission was created by Platform9 Systems in 2017 as an open-source serverless framework for Kubernetes.

Industrial Note

Fission is particularly suited for teams already running Kubernetes who want lightweight, event-driven serverless functions without managing containers manually.

More Fission Typing Exercises

Simple Fission Function (Go)Python HTTP FunctionNode.js Function ExampleGo Function with Query ParamPython Function with POST BodyNode.js Function with ParamsGo JSON Response FunctionPython Environment Variables

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher