changed location of static files and port

This commit is contained in:
Duncan Phelps 2021-05-25 17:58:01 -05:00
parent 6b2f5c5362
commit 8444c7ab44
2 changed files with 5 additions and 2 deletions

1
.gitignore vendored

@ -1,5 +1,6 @@
.now
node_modules
build
# Environment Variables
.env

@ -5,12 +5,14 @@ const upload = require('./upload/index');
const save = require('./save/index');
const file = require('./file/index');
const bodyParser = require('body-parser');
const port = 5000;
const port = 50001;
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(express.static('public'));
// app.use(express.static('public'));
//serve static files from build folder instead of public folder
app.use('/', express.static('build'));
app.use('/api/data', data);
app.use('/api/upload', upload);