Skip to content

Commit

Permalink
[Yay] Fixing the issue with absolute URL for hosted apps
Browse files Browse the repository at this point in the history
Signed-off-by: Soumya Deb <debloper@gmail.com>
  • Loading branch information
debloper committed Jun 20, 2014
1 parent 2af1322 commit cc68b33
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded());
app.use(cookieParser("banana"));
app.use("/assets", express.static(path.join(__dirname, 'assets')));
app.use("/", express.static(path.join(__dirname, 'static')));
app.use(session({ secret: "potato" }));


// --- Begin routes ---- //
app.use("/", require("./routes/home"));
app.use("/api", require("./routes/api"));
Expand Down
2 changes: 1 addition & 1 deletion routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ router.post("/apps/create", function (req, res) {
manifest: {
name: appName,
description: appDesc,
launch_path: appUrl,
launch_path: "/webapp.html?" + appUrl,
icons: {
"60": "/assets/img/icon_60.png",
"128": "/assets/img/icon_128.png"
Expand Down
14 changes: 14 additions & 0 deletions static/webapp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

<!DOCTYPE html>
<html>

<head>
</head>

<body>
<script>
location.replace(location.search.split("?")[1] || "http://explore.applait.io");
</script>
</body>

</html>

0 comments on commit cc68b33

Please sign in to comment.