more configs

This commit is contained in:
Ben Elferink
2021-02-03 22:44:40 +02:00
parent 1e86859cc1
commit 60cf80ece7
5 changed files with 35 additions and 4 deletions

15
client/.gitignore vendored
View File

@@ -1,4 +1,17 @@
# dependencies
/node_modules /node_modules
.env
# testing
/coverage
# production
/build
# misc
.DS_Store .DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.eslintcache .eslintcache

View File

@@ -1,6 +1,8 @@
{ {
"homepage": "",
"name": "client", "name": "client",
"version": "1.0.0", "version": "1.0.0",
"description": "",
"private": true, "private": true,
"main": "index.js", "main": "index.js",
"license": "ISC", "license": "ISC",

16
server/.gitignore vendored
View File

@@ -1,3 +1,17 @@
# dependencies
/node_modules /node_modules
.env
# testing
/coverage
# production
/build
# misc
.DS_Store .DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.eslintcache

View File

@@ -9,7 +9,7 @@ import morgan from 'morgan'; // Logs incoming requests
// initialize app // initialize app
const app = express(); const app = express();
const origin = '*'; const origin = '*'; // allow source of requests (* --> everywhere)
// middlewares // middlewares
dotenv.config(); dotenv.config();
@@ -34,7 +34,7 @@ db.on('disconnected', () => console.log('❌ MongoDB disconnected')); // disconn
db.on('error', (error) => console.log('❌ MongoDB connection error', error)); // listen for errors during the session db.on('error', (error) => console.log('❌ MongoDB connection error', error)); // listen for errors during the session
// routes // routes
app.get('/', (request, response, next) => response.status(200).json('Hello World - Express.js')); app.get('/', (request, response, next) => response.status(200).json('<h1>Hello World!</h1>'));
// app.use('/api/v1/users', routes); // app.use('/api/v1/users', routes);
// ^ ^ ^ un-comment this to use imported route(s) // ^ ^ ^ un-comment this to use imported route(s)

View File

@@ -1,6 +1,8 @@
{ {
"homepage": "",
"name": "server", "name": "server",
"version": "1.0.0", "version": "1.0.0",
"description": "",
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",
"scripts": { "scripts": {