Skip to content

Instantly share code, notes, and snippets.

View iam-hussain's full-sized avatar
🏠
Working from home

Jakir Hussain iam-hussain

🏠
Working from home
View GitHub Profile
@iam-hussain
iam-hussain / default HTTP
Last active September 29, 2024 17:15
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# Serve nextJS app from a port through NGINX reverse proxy (HTTP)
# Path: /etc/nginx/sites-available/default
# Default server configuration for HTTP
server {
server_name www.DOMAINNAME.com DOMAINNAME.com;
# Serve any static assets with NGINX
location /_next/static {
alias /home/ubuntu/PROJECT_FOLDER/.next/static;
@iam-hussain
iam-hussain / GitLab CI NextJS PM2 AWS .gitlab-ci.yml
Last active March 6, 2023 18:29
Use GitLab CI to build, deploy, restart the NextJS PM2 server in the AWS instance
#Path: PROJECT_DIRECTORY/.gitlab-ci.yml
stages:
- build
- deploy
building:
stage: build
image: node:16
variables:
@iam-hussain
iam-hussain / rename_js_files.sh
Created August 10, 2022 14:57 — forked from afternoon/rename_js_files.sh
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;