Explorar el Código

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

kindring hace 2 años
padre
commit
45164474e7
Se han modificado 2 ficheros con 1 adiciones y 0 borrados
  1. BIN
      public/title.png
  2. 1 0
      src/app.ts

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) => {