Changed location of build folder
This commit is contained in:
parent
f9e7f97156
commit
b513d50751
5 changed files with 20 additions and 27 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,6 +2,9 @@
|
|||
# Created by https://www.toptal.com/developers/gitignore/api/node,react,git,visualstudiocode
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node,react,git,visualstudiocode
|
||||
|
||||
### Express ###
|
||||
**/public/
|
||||
|
||||
### TODO ###
|
||||
TODO
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "cp ${ENV:-'../.env'} .env && rm -rf build && react-scripts build",
|
||||
"build": "cp ${ENV:-'../.env'} .env && react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB |
|
|
@ -1,25 +1,15 @@
|
|||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@ app.use(logger('dev'));
|
|||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: false }));
|
||||
app.use(cookieParser());
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
app.use('/public', express.static(path.join(__dirname, 'public')));
|
||||
app.use(cors());
|
||||
|
||||
app.use('/api/auth', authRouter);
|
||||
app.use('/api/org', orgRouter);
|
||||
|
||||
app.use(express.static(path.join(__dirname, '../client/build')));
|
||||
app.use(express.static(path.join(__dirname, 'public/build')));
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../client/build/index.html'));
|
||||
res.sendFile(path.join(__dirname, './public/build/index.html'));
|
||||
});
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
|
|
|
|||
Reference in a new issue