Skip to content

Instantly share code, notes, and snippets.

View abidtkg's full-sized avatar
:atom:
Converting idea to code

Abid Hasan abidtkg

:atom:
Converting idea to code
View GitHub Profile
@nyx-code
nyx-code / FileUpload.js
Last active November 25, 2022 20:50
This NodeJS API which will upload files onto the AWS S3 Bucket. Video -> https://youtu.be/TtuCCfren_I
require('dotenv/config')
const express = require('express')
const multer = require('multer')
const AWS = require('aws-sdk')
const uuid = require('uuid/v4')
const app = express()
const port = 3000
// Sending an HTTP Request from a NodeJS server
//const http = require("http");
const https = require("https");
const Stream = require("stream").Transform;
const fs = require("fs");
https
.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY", resp => {
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active June 22, 2024 09:34
Node app deploy with nginx & SSL

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. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@indyfromoz
indyfromoz / aspnet-mvc.gitignore
Created November 19, 2012 06:44
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache