Skip to content

Instantly share code, notes, and snippets.

View anishbishnoi127's full-sized avatar

Anish Kumar anishbishnoi127

View GitHub Profile
@adityathakurxd
adityathakurxd / index.js
Last active February 27, 2024 20:21
Node Server code to use Firebase Admin SDK to send out push notifications. When a post endpoint is hit on the Node JS server, it delivers a notification to a Flutter app using Firebase Messaging.
import {initializeApp, applicationDefault } from 'firebase-admin/app';
import { getMessaging } from "firebase-admin/messaging";
import express, { json } from "express";
import cors from "cors";
process.env.GOOGLE_APPLICATION_CREDENTIALS;
const app = express();
app.use(express.json());

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Create Free AWS Account

Create free AWS Account at https://aws.amazon.com/

2. Create and Lauch an EC2 instance and SSH into machine

I would be creating a t2.medium ubuntu machine for this demo.

import { useCallback, useEffect, useState } from "react";
interface BaseProps{
path:string,
start:boolean
}
type GetProps = {
method:"GET"|"HEAD",
data?:never
@Eomm
Eomm / fastify-oss.md
Last active June 4, 2024 10:38
Start contributing to OSS

Start contributing to OSS

Do you want to start contributing to Open Souce Software and the Fastify project?

It would be best if you started asking yourself where to start:

  • Do you want to write code?
  • Do you want to understand how things work?
  • Do you like DevOps stuff?
  • Do you want to work on Github action automation?
  • Do you want to make an impact on the community?