more configs
This commit is contained in:
15
client/.gitignore
vendored
15
client/.gitignore
vendored
@@ -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
|
||||||
@@ -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
16
server/.gitignore
vendored
@@ -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
|
||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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": {
|
||||||
|
|||||||
Reference in New Issue
Block a user