Skip to content

Instantly share code, notes, and snippets.

View trycatchfinallydev's full-sized avatar

trycatchfinallydev

View GitHub Profile
@trycatchfinallydev
trycatchfinallydev / Procfile
Created August 31, 2020 18:55
Heroku Procfile for use with NGINX buildpack and NodeJS application
web: bin/start-nginx node server.js
@trycatchfinallydev
trycatchfinallydev / server.js
Created August 31, 2020 18:53
NextJS Custom Server definition for use with Heroku NGINX buildpack
const { createServer } = require('http')
const { parse } = require('url')
const next = require('next')
const fs = require('fs');
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
app.prepare().then(() => {