File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 },
1313 "scripts" : {
1414 "dev" : " NODE_ENV=dev ts-node-dev --ignore-watch node_modules --inspect=0.0.0.0:9267 ./src/apps/mooc_backend/server.ts" ,
15- "dev:backoffice:frontend" : " NODE_ENV=dev ts-node-dev --ignore-watch node_modules --inspect=0.0.0.0:9267 ./src/apps/backoffice/frontend/server.ts" ,
15+ "dev:backoffice:frontend" : " NODE_ENV=dev ts-node-dev --ignore-watch node_modules ./src/apps/backoffice/frontend/server.ts" ,
1616 "test" : " npm run test:unit && npm run test:features" ,
1717 "test:unit" : " NODE_ENV=test jest" ,
1818 "test:features" : " NODE_ENV=test cucumber-js -p default" ,
Original file line number Diff line number Diff line change 1+ import { Request , Response } from 'express' ;
2+ import { CoursesCounterFinder } from '../../../../Contexts/Mooc/CoursesCounter/application/Find/CoursesCounterFinder' ;
3+
4+ export class CoursesGetController {
5+ constructor ( private coursesCounterFinder : CoursesCounterFinder ) { }
6+
7+ async run ( req : Request , res : Response ) {
8+ // const courses = await this.coursesCounterFinder.run();
9+
10+ res . render ( 'pages/courses' , {
11+ title : 'Welcome' ,
12+ description : 'CodelyTV - Backoffice' ,
13+ courses_counter : 0 ,
14+ new_course_id : 'xxxx'
15+ } ) ;
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ import { Express } from 'express' ;
2+ import container from '../config/dependency-injection' ;
3+ import { CoursesGetController } from '../controllers/CoursesGetController' ;
4+
5+ export const register = ( app : Express ) => {
6+ const controller : CoursesGetController = container . get ( 'Apps.Backoffice.Frontend.controllers.CoursesGetController' ) ;
7+ app . get ( '/courses' , controller . run . bind ( controller ) ) ;
8+ } ;
Original file line number Diff line number Diff line change 1+ {% extends '../master.html' %}
2+
3+ {% block page_title %}Cursos{% endblock %}
4+
5+ {% block main %}
6+ < div class ="max-w-sm rounded overflow-hidden shadow-lg float-left ">
7+ < img class ="w-full " src ="https://codely.tv/pro/img/bg/cursos-codelytv-pro.png " alt ="Sunset in the mountains ">
8+ < div class ="px-6 py-4 ">
9+ < div class ="font-bold text-xl mb-2 "> Cursos</ div >
10+ < p class ="text-gray-700 text-base ">
11+ Actualmente CodelyTV Pro cuenta con < b > {{ courses_counter }}</ b > cursos.
12+ </ p >
13+ </ div >
14+ </ div >
15+ < div class ="clearfix mb-10 "> </ div >
16+ < hr class ="mb-10 ">
17+ {% endblock %}
Original file line number Diff line number Diff line change 1+ {}
You can’t perform that action at this time.
0 commit comments