Read .env
This commit is contained in:
parent
895dbbd060
commit
8ca22f35af
3 changed files with 8 additions and 4 deletions
1
server/.env.example
Normal file
1
server/.env.example
Normal file
|
|
@ -0,0 +1 @@
|
|||
secret = oIMzR4YvM9x9NoPrQfk4
|
||||
1
server/.gitignore
vendored
1
server/.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
|||
/storage
|
||||
/node_modules
|
||||
/.DS_Store
|
||||
.env
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue