Skip to content

Instantly share code, notes, and snippets.

View shailesh74250's full-sized avatar
🎯
Focusing

shailesh kumar shailesh74250

🎯
Focusing
View GitHub Profile

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.

@shailesh74250
shailesh74250 / README.md
Created January 30, 2024 09:14 — forked from piyushgarg-dev/README.md
Kafka Crash Course
import React from 'react';
import Button, { IButtonProps } from '.';
interface IButtonDeleteProps extends Pick<IButtonProps, 'onClick'> {}
const ButtonDelete: React.FC<IButtonDeleteProps> = props => (
<Button size="large" {...props}>
Delete
</Button>
);
@shailesh74250
shailesh74250 / finished.js
Created January 16, 2022 14:59 — forked from adrianhajdin/finished.js
Amazon Scraper API
const express = require('express');
const request = require('request-promise');
const PORT = process.env.PORT || 5000;
const app = express();
app.use(express.json());
const returnScraperApiUrl = (apiKey) => `http://api.scraperapi.com?api_key=${apiKey}&autoparse=true`;
@shailesh74250
shailesh74250 / axios-catch-error.js
Created December 31, 2019 05:27 — forked from fgilio/axios-catch-error.js
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success πŸŽ‰
console.log(response);
} catch (error) {
// Error 😨