more configs
This commit is contained in:
15
client/.gitignore
vendored
15
client/.gitignore
vendored
@@ -1,4 +1,17 @@
|
||||
# dependencies
|
||||
/node_modules
|
||||
.env
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.eslintcache
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"homepage": "",
|
||||
"name": "client",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"license": "ISC",
|
||||
|
||||
16
server/.gitignore
vendored
16
server/.gitignore
vendored
@@ -1,3 +1,17 @@
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.eslintcache
|
||||
@@ -9,7 +9,7 @@ import morgan from 'morgan'; // Logs incoming requests
|
||||
|
||||
// initialize app
|
||||
const app = express();
|
||||
const origin = '*';
|
||||
const origin = '*'; // allow source of requests (* --> everywhere)
|
||||
|
||||
// middlewares
|
||||
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
|
||||
|
||||
// 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);
|
||||
// ^ ^ ^ un-comment this to use imported route(s)
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"homepage": "",
|
||||
"name": "server",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user