Skip to content

Commit d2bde9b

Browse files
Ismael Ramosiramos
authored andcommitted
feat(ssr): removes webpack, refactor routes and endpoints and updates ssr structure
1 parent e56173a commit d2bde9b

67 files changed

Lines changed: 1104 additions & 887 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

angular.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"options": {
1616
"outputPath": "dist/browser/",
1717
"index": "src/index.html",
18-
"main": "src/main.ts",
18+
"main": "src/main.browser.ts",
1919
"polyfills": "src/polyfills.ts",
20-
"tsConfig": "src/tsconfig.app.json",
20+
"tsConfig": "src/tsconfig.browser.json",
2121
"assets": [
2222
{
2323
"glob": "**/*",
@@ -50,11 +50,11 @@
5050
"node_modules/ngx-progressive-image-loader/ngx-progressive-image-loader.scss",
5151
"src/assets/css/reset.css",
5252
"src/assets/css/loading.css",
53-
"src/app/styles/global.scss"
53+
"src/app/shared/styles/global.scss"
5454
],
5555
"stylePreprocessorOptions": {
5656
"includePaths": [
57-
"src/app/styles"
57+
"src/app/shared/styles"
5858
]
5959
},
6060
"scripts": [
@@ -178,7 +178,7 @@
178178
},
179179
"src/assets/css/reset.css",
180180
"src/assets/css/loading.css",
181-
"src/app/styles/global.scss"
181+
"src/app/shared/styles/global.scss"
182182
],
183183
"assets": [
184184
{
@@ -209,7 +209,7 @@
209209
],
210210
"stylePreprocessorOptions": {
211211
"includePaths": [
212-
"src/app/styles"
212+
"src/app/shared/styles"
213213
]
214214
},
215215
"watch": false,
@@ -220,7 +220,7 @@
220220
"builder": "@angular-devkit/build-angular:tslint",
221221
"options": {
222222
"tsConfig": [
223-
"src/tsconfig.app.json",
223+
"src/tsconfig.browser.json",
224224
"src/tsconfig.spec.json"
225225
],
226226
"exclude": [
@@ -235,7 +235,7 @@
235235
"tsConfig": "src/tsconfig.server.json",
236236
"stylePreprocessorOptions": {
237237
"includePaths": [
238-
"src/app/styles"
238+
"src/app/shared/styles"
239239
]
240240
}
241241
},

e2e/src/modules/heroes/heroes-list/heroes-list-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {browser, by, element} from 'protractor';
2-
import {AppConfig} from '../../../../../src/app/configs/app.config';
2+
import {RoutesConfig} from '../../../../../src/app/configs/routes.config';
33

44
export class HeroesListPage {
55
static navigateTo(): any {
6-
return browser.get(AppConfig.routes.heroes);
6+
return browser.get(RoutesConfig.routesNames.heroes.basePath);
77
}
88

99
static getNumberHeroes(): any {

functions/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const modulemapngfactoryloader = require('@nguniversal/module-map-ngfactory-load
88

99
const express = require('express');
1010
const path = require('path');
11+
const helmet = require('helmet');
1112

1213
core.enableProdMode();
1314

@@ -19,6 +20,9 @@ const routes = [
1920
{path: '/*', view: 'index', bundle: require('./dist/server/en/main')}
2021
];
2122

23+
app.use(helmet());
24+
app.use(helmet.noCache());
25+
2226
// Load your engine
2327
app.engine('html', (filePath, options, callback) => {
2428
options.engine(

0 commit comments

Comments
 (0)