Read .env

This commit is contained in:
KGrzeg 2021-10-17 18:57:26 +02:00
parent 895dbbd060
commit 8ca22f35af
3 changed files with 8 additions and 4 deletions

1
server/.env.example Normal file
View file

@ -0,0 +1 @@
secret = oIMzR4YvM9x9NoPrQfk4

1
server/.gitignore vendored
View file

@ -2,3 +2,4 @@
/storage
/node_modules
/.DS_Store
.env

View file

@ -1,9 +1,11 @@
import express from 'express';
import express from 'express'
import 'dotenv/config'
const app = express();
const app = express()
app.get("/", (req, res) => {
res.send("hello");
res.send("hello")
console.log(process.env.secret);
});
app.listen(3000);
app.listen(3000)