'use strict'

const express = require('express')
require('dotenv').config({path: '../.env'})

const app = express()
const port = process.env.SITE_PORT

app.use(express.static('public'))

app.get('/', (req, res) => {
    res.sendFile('index.html')
})

app.listen(port, () => {
    console.log('listening on port', port)
})

'use strict'

const express = require('express')
const dotenv = require('dotenv')

const result = dotenv.config()
if (result.error)
    dotenv.config({
        path: '../.env'
    })

const app = express()
const port = process.env.SITE_PORT

app.use(express.static('public'))

app.get('/', (req, res) => {
    res.sendFile('index.html')
})

app.listen(port, () => {
    console.log('listening on port', port)
})
Fix not finding .env on live
Site: Fix not finding .env on live
