Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #196 from EtienneM/master
Browse files Browse the repository at this point in the history
Add one-click button to Scalingo
  • Loading branch information
Natim authored Jul 5, 2017
2 parents a099642 + ae998d0 commit 2beceb7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Formbuilder
If you want to try it out, have a look [at the demo
page](https://kinto.github.io/formbuilder/)

Or deploy it on Scalingo in a single click on this button:

[![Deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy)

Scalingo offer a 1 month free trial then 7.20€ / month.

# Installation

To run the formbuilder locally, you can issue the following commands:
Expand Down
9 changes: 6 additions & 3 deletions devServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ var path = require("path");
var express = require("express");
var webpack = require("webpack");

var env = "dev", port = 8080;
var port = process.env.PORT || 8080;
var host = process.env.HOST || "localhost";

var env = "dev";

var webpackConfig = require("./webpack.config." + env);
var compiler = webpack(webpackConfig);
Expand All @@ -23,11 +26,11 @@ app.get("/react-jsonschema-form.css", function(req, res) {
res.sendFile(path.join(__dirname, "css", "react-jsonschema-form.css"));
});

app.listen(port, "localhost", function(err) {
app.listen(port, host, function(err) {
if (err) {
console.log(err);
return;
}

console.log("Listening at http://localhost:" + port);
console.log("Listening at http://" + host + ":" + port);
});
25 changes: 25 additions & 0 deletions scalingo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Formbuilder",
"description": "Create your own forms and surveys, get your data back.",
"repository": "https://github.com/Kinto/formbuilder",
"website": "https://github.com/Kinto/formbuilder#readme",
"logo": "https://avatars0.githubusercontent.com/u/13413813",
"env": {
"PROJECT_NAME": {
"description": "Name of the project. Defaults to \"formbuilder\".",
"value": "$APP"
},
"SERVER_URL": {
"description": "URL of the Kinto server. It's default value depends on the environment that's being used (development, production, etc.)",
"value": ""
},
"HOST": {
"description": "Listens connection on the specified host. Defaults to \"localhost\".",
"value": "0.0.0.0"
},
"NPM_CONFIG_PRODUCTION": {
"description": "Install dev dependencies",
"value": "false"
}
}
}

0 comments on commit 2beceb7

Please sign in to comment.