Skip to content

Instantly share code, notes, and snippets.

View ChrisGV04's full-sized avatar
🤓
HTTP 429 — Too Many Requests

Christian Gil ChrisGV04

🤓
HTTP 429 — Too Many Requests
View GitHub Profile
@ChrisGV04
ChrisGV04 / app.vue
Last active July 13, 2025 00:53
Small example on how to do file uploads on Nuxt 3 & Nitro. I believe it requires Node v20+. Heavily inspired by NuxtHub
<script setup lang="ts">
async function uploadFiles(e: Event) {
const input = e.target as HTMLInputElement;
const files = input.files;
if (!files) return;
const fd = new FormData();
for (const file of files) {
//Authorization popup window code
function ShowAuthWindow(options)
{
console.log('ee');
options.windowName = options.windowName || 'ConnectWithOAuth'; // should not include space for IE
options.windowOptions = options.windowOptions || 'location=0,status=0,width=800,height=400';
options.callback = options.callback || function(){ window.location.reload(); };
var that = this;
console.log(options.path);
that._oauthWindow = window.open(options.path, options.windowName, options.windowOptions);
@ChrisGV04
ChrisGV04 / node-deployment.md
Last active March 19, 2024 22:47
Steps to deploy a Node.js app in Ubuntu 20.4 with Nginx, PM2, Redis and MongoDB

Steps to deploy a Node.js app with NGINX and PM2

This where the steps I took to deploy one of my apps to Vultr on an Ubuntu server. It also includes the installation of the SSL certificate

Create SSH Key

If you don't have an SSH key in your local machine, you'll need to create one by runninig:

# You will be prompted to set the file name and a password