Explorar o código

添加头像,以及静态资源挂载

kindring %!s(int64=2) %!d(string=hai) anos
pai
achega
45164474e7
Modificáronse 2 ficheiros con 1 adicións e 0 borrados
  1. BIN=BIN
      public/title.png
  2. 1 0
      src/app.ts

BIN=BIN
public/title.png


+ 1 - 0
src/app.ts

@@ -14,6 +14,7 @@ function main():void{
     }
     const app:Application = express();
     app.use(morganMiddleware);
+    app.use('/static',express.static('./public/'));
     app.use(bodyParser.urlencoded({ limit: '10mb', extended: true }));
     app.use(bodyParser.json({ limit: '10mb' }));
     app.get('/', (req:Request, res:Response, next:NextFunction) => {