Advertisement
Guest User

app.js

a guest
Dec 4th, 2019
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. (() => {
  2. const app = Sammy('#rooter', function () {
  3. this.use("Handlebars", "hbs");
  4.  
  5. this.get("/", function (ctx) {
  6. this.loadPartials(getPartials())
  7. .partial("./templates/home.hbs");
  8. });
  9.  
  10. this.get("/register", function (ctx) {
  11.  
  12. })
  13. this.post("/register", function (ctx) {
  14.  
  15. })
  16. this.get("/login", function (ctx) {
  17.  
  18. })
  19. this.post("/register", function (ctx) {
  20.  
  21. })
  22. this.get("/logout", function (ctx) {
  23.  
  24. })
  25. function getPartials() {
  26. return {
  27. header: "./templates/common/header.hbs",
  28. footer: "./templates/common/footer.hbs"
  29. }
  30. }
  31. });
  32.  
  33. app.run();
  34. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement