Compare commits
No commits in common. "c286a2f9c24becbe366e151c96c0884c8930e364" and "500f22aad403271e3160b5ee3cf31acbdcfbb462" have entirely different histories.
c286a2f9c2
...
500f22aad4
5 changed files with 0 additions and 1120 deletions
12
package.json
12
package.json
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"name": "react-personal-website",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC"
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
const express = require('express');
|
|
||||||
const cors = require('cors');
|
|
||||||
const path = require('path');
|
|
||||||
// const postsRoutes = require('./routes/posts'); //TODO uncomment as this is built
|
|
||||||
// const projectsRoutes = require('./routes/projects'); //TODO uncomment as this is built
|
|
||||||
|
|
||||||
const app = express();
|
|
||||||
|
|
||||||
// Middleware
|
|
||||||
|
|
||||||
app.use(cors());
|
|
||||||
app.use(express.json());
|
|
||||||
|
|
||||||
// API Routes
|
|
||||||
// app.use('/api/posts', postsRoutes); //TODO uncomment as this is built
|
|
||||||
// app.use('/api/projects', projectsRoutes); //TODO uncomment as this is built
|
|
||||||
|
|
||||||
// Serve Static files in production
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
app.use(express.static(path.join(__dirname, '../client/dist')));
|
|
||||||
|
|
||||||
app.get('*', (req, res) => {
|
|
||||||
res.sendFile(path.resolve(__dirname, '../client', 'dist', 'index.html'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = app;
|
|
1055
server/package-lock.json
generated
1055
server/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"name": "server",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"description": "",
|
|
||||||
"dependencies": {
|
|
||||||
"cors": "^2.8.5",
|
|
||||||
"express": "^4.21.2",
|
|
||||||
"fs-extra": "^11.3.0",
|
|
||||||
"gray-matter": "^4.0.3",
|
|
||||||
"marked": "^15.0.7",
|
|
||||||
"path": "^0.12.7"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
const app = require('./app');
|
|
||||||
const PORT = process.env.PORT || 5000;
|
|
||||||
|
|
||||||
app.listen(PORT, () => {
|
|
||||||
console.log(`Server running on port ${PORT}`);
|
|
||||||
});
|
|
Loading…
Reference in a new issue