Skip to content

Instantly share code, notes, and snippets.

View bonface221's full-sized avatar
:octocat:
coding

Bonface Maina | TechWithTwin bonface221

:octocat:
coding
View GitHub Profile
@bonface221
bonface221 / index.html
Created April 18, 2024 13:49
EMBED youtube without showing all the options
<iframe
src="https://www.youtube.com/embed/BYN_cVnP4fc?autoplay=1&mute=1&playsinline=1&loop=1&playlist=BYN_cVnP4fc&controls=0&disablekb=1"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
@bonface221
bonface221 / server.js
Last active February 13, 2024 14:00
Next.js Deployment with Express: !! -> install express first using yarn add express or npm install express and then create a file called server.js-(server js should be at the root of the application.) and add the following-
const express = require("express");
const next = require("next");
const dev = process.env.NODE_ENV !== "production"; // make sure to have the NODE_ENV on the env
const app = next({ dev });
const handle = app.getRequestHandler();
app.prepare().then(() => {
const server = express();