File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Other tools and technologies used:
1919* [ Bcrypt.js] ( https://github.com/dcodeIO/bcrypt.js ) : password encryption
2020
2121## Prerequisites
22- 1 . Install [ Node.js] ( https://nodejs.org ) and [ MongoDB] ( https://www.mongodb.com )
22+ 1 . Install [ Node.js] ( https://nodejs.org ) and [ MongoDB Community Edition ] ( https://www.mongodb.com/try/download/community )
23232 . Install Angular CLI: ` npm i -g @angular/cli `
24243 . From project root folder install all the dependencies: ` npm i `
2525
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import { join as pathJoin } from 'path';
66import { connectToMongo } from './mongo' ;
77import setRoutes from './routes' ;
88
9+ const feDir = 'public/browser' ;
910const app = express ( ) ;
1011app . set ( 'port' , ( process . env . PORT || 3000 ) ) ;
11- app . use ( '/' , express . static ( pathJoin ( __dirname , ' ../public' ) ) ) ;
12+ app . use ( '/' , express . static ( pathJoin ( __dirname , ` ../${ feDir } ` ) ) ) ;
1213app . use ( express . json ( ) ) ;
1314app . use ( express . urlencoded ( { extended : false } ) ) ;
1415if ( process . env . NODE_ENV !== 'test' ) {
@@ -21,7 +22,7 @@ const main = async (): Promise<void> => {
2122 try {
2223 await connectToMongo ( ) ;
2324 app . get ( '/*' , ( req , res ) => {
24- res . sendFile ( pathJoin ( __dirname , ' ../public /index.html' ) ) ;
25+ res . sendFile ( pathJoin ( __dirname , ` ../${ feDir } /index.html` ) ) ;
2526 } ) ;
2627 app . listen ( app . get ( 'port' ) , ( ) => console . log ( `Angular Full Stack listening on port ${ app . get ( 'port' ) } ` ) ) ;
2728 } catch ( err ) {
You can’t perform that action at this time.
0 commit comments