Skip to content

Commit

Permalink
sample(@nestjs) move public and views dirs outside of the src
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jul 5, 2018
1 parent 3cf8607 commit 0c4fe26
Show file tree
Hide file tree
Showing 8 changed files with 3,160 additions and 1,645 deletions.
2,224 changes: 1,465 additions & 759 deletions sample/15-mvc/package-lock.json

Large diffs are not rendered by default.

Empty file added sample/15-mvc/public/.gitkeep
Empty file.
5 changes: 3 additions & 2 deletions sample/15-mvc/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { NestFactory } from '@nestjs/core';
import { join } from 'path';
import { ApplicationModule } from './app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);

app.useStaticAssets(__dirname + '/public');
app.setBaseViewsDir(__dirname + '/views');
app.useStaticAssets(join(__dirname + './../public'));
app.setBaseViewsDir(join(__dirname + './../views'));
app.setViewEngine('hbs');

await app.listen(3000);
Expand Down
File renamed without changes.
Loading

0 comments on commit 0c4fe26

Please sign in to comment.