implemented limited homepage

main
Inga 🏳‍🌈 2 years ago
parent bfabff741d
commit adcd57e60c
  1. 3
      client/index.html
  2. 4
      client/simpleform/index.html
  3. 33
      package-lock.json
  4. 1
      package.json
  5. 5
      src/app.module.ts

@ -0,0 +1,3 @@
<p><a href="/api">API docs</a></p>
<p><a href="/api-json">OpenAPI specification</a></p>
<p><a href="/simpleform">Simple form</a></p>

@ -0,0 +1,4 @@
<form action="/screenshots" method="POST" target="_blank">
<input type="text" name="a">
<input type="text" name="b"><input type="submit">
</form>

33
package-lock.json generated

@ -14,6 +14,7 @@
"@nestjs/config": "^2.2.0", "@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0", "@nestjs/core": "^9.0.0",
"@nestjs/platform-express": "^9.0.0", "@nestjs/platform-express": "^9.0.0",
"@nestjs/serve-static": "^3.0.0",
"@nestjs/swagger": "^6.0.1", "@nestjs/swagger": "^6.0.1",
"class-validator": "^0.13.2", "class-validator": "^0.13.2",
"puppeteer": "^15.3.2", "puppeteer": "^15.3.2",
@ -1666,6 +1667,23 @@
"typescript": "^4.3.5" "typescript": "^4.3.5"
} }
}, },
"node_modules/@nestjs/serve-static": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nestjs/serve-static/-/serve-static-3.0.0.tgz",
"integrity": "sha512-TpXjgs4136dQqWUjEcONqppqXDsrJhRkmKWzuBMOUAnP4HjHpNmlycvkHnDnWSoG2YD4a7Enh4ViYGWqCfHStA==",
"dependencies": {
"path-to-regexp": "0.2.5"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",
"@nestjs/core": "^9.0.0"
}
},
"node_modules/@nestjs/serve-static/node_modules/path-to-regexp": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.2.5.tgz",
"integrity": "sha512-l6qtdDPIkmAmzEO6egquYDfqQGPMRNGjYtrU13HAXb3YSRrt7HSb1sJY0pKp6o2bAa86tSB6iwaW2JbthPKr7Q=="
},
"node_modules/@nestjs/swagger": { "node_modules/@nestjs/swagger": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-6.0.1.tgz", "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-6.0.1.tgz",
@ -10195,6 +10213,21 @@
"pluralize": "8.0.0" "pluralize": "8.0.0"
} }
}, },
"@nestjs/serve-static": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nestjs/serve-static/-/serve-static-3.0.0.tgz",
"integrity": "sha512-TpXjgs4136dQqWUjEcONqppqXDsrJhRkmKWzuBMOUAnP4HjHpNmlycvkHnDnWSoG2YD4a7Enh4ViYGWqCfHStA==",
"requires": {
"path-to-regexp": "0.2.5"
},
"dependencies": {
"path-to-regexp": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.2.5.tgz",
"integrity": "sha512-l6qtdDPIkmAmzEO6egquYDfqQGPMRNGjYtrU13HAXb3YSRrt7HSb1sJY0pKp6o2bAa86tSB6iwaW2JbthPKr7Q=="
}
}
},
"@nestjs/swagger": { "@nestjs/swagger": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-6.0.1.tgz", "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-6.0.1.tgz",

@ -26,6 +26,7 @@
"@nestjs/config": "^2.2.0", "@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0", "@nestjs/core": "^9.0.0",
"@nestjs/platform-express": "^9.0.0", "@nestjs/platform-express": "^9.0.0",
"@nestjs/serve-static": "^3.0.0",
"@nestjs/swagger": "^6.0.1", "@nestjs/swagger": "^6.0.1",
"class-validator": "^0.13.2", "class-validator": "^0.13.2",
"puppeteer": "^15.3.2", "puppeteer": "^15.3.2",

@ -6,6 +6,8 @@ import { ScreenshotterService } from './screenshotter/screenshotter.service';
import { BullModule } from '@nestjs/bull'; import { BullModule } from '@nestjs/bull';
import { ScreenshotsModule } from './screenshots/screenshots.module'; import { ScreenshotsModule } from './screenshots/screenshots.module';
import { BullConfigService } from './bull/bullConfigService'; import { BullConfigService } from './bull/bullConfigService';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
@Module({ @Module({
imports: [ imports: [
@ -16,6 +18,9 @@ import { BullConfigService } from './bull/bullConfigService';
inject: [ConfigService], inject: [ConfigService],
}), }),
ScreenshotsModule, ScreenshotsModule,
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'client'),
}),
], ],
controllers: [HelloWorldController], controllers: [HelloWorldController],
providers: [HelloWorldService, ScreenshotterService], providers: [HelloWorldService, ScreenshotterService],

Loading…
Cancel
Save