Skip to content

Commit

Permalink
prettier on some ts
Browse files Browse the repository at this point in the history
  • Loading branch information
emreycolakoglu committed May 7, 2018
1 parent 6c634d4 commit 65bb296
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Engine } from "./repository/business/engine";
import logger from "./logger";
// Creates and configures an ExpressJS web server.
class App {

// ref to Express instance
public express: express.Application;

Expand All @@ -38,13 +37,16 @@ class App {

// Configure API endpoints.
private routes(): void {
this.express.get("/", function (req, res) {
this.express.get("/", function(req, res) {
res.render("index");
});
this.express.get("/panel", function (req, res) {
this.express.get("/panel", function(req, res) {
res.render("panel");
});
this.express.use("/node_modules", express.static(path.join(__dirname, "../node_modules")));
this.express.use(
"/node_modules",
express.static(path.join(__dirname, "../node_modules"))
);
this.express.use("/asset", express.static(path.join(__dirname, "./panel")));
this.express.use("/api", <express.Router>routes);
}
Expand All @@ -54,8 +56,7 @@ class App {
const promise = mongoose.connect(process.env.MONGOSTRING, (err: any) => {
if (err) {
logger.error(err);
}
else {
} else {
logger.info("Mongoose running");
}
});
Expand All @@ -66,4 +67,4 @@ class App {
}
}

export default new App().express;
export default new App().express;

0 comments on commit 65bb296

Please sign in to comment.