Node Js && Angular 7 Blog Porject
- Create a Mysql DataBase
- Edit blogBackend/Utilities/mysqlConfig.js
{ host: 'remotemysql.com', user: 'C6dhFyew1n', password: 'yXLUV7ycKs', database: 'C6dhFyew1n', }
Second Path is About Front End
-
RUN npm install -g @angular/cli
-
RUN npm install
-
RUN npm run build
-
Edit blogFront/src/app/app-routing.module.ts
{path: 'metropoladmin', component: EventComponent},
{path: '', component: IndexComponent},
{path: 'pages', component: PagesComponent},
{path: 'product', component: ProductComponent},
{path: 'categories', component: CategoriesComponent},
Edit all path for each to '' and build then copy dist
folder and rename to the old path name
you should have 4 file with the following path name
app.use('/product',express.static(path.join(__dirname, "site/product"))); app.use('/pages',express.static(path.join(__dirname, "site/pages"))); app.use('/index',express.static(path.join(__dirname, "site/index"))); app.use('/',express.static(path.join(__dirname, "site/index")));
copy all of them and change it in blogBackend/site path then build backend with node server.js