Skip to content

Commit

Permalink
Merge pull request #121 from clarlars/clarlars-port
Browse files Browse the repository at this point in the history
Add in functionality to allow user to specify port
  • Loading branch information
wbrunette authored Jul 28, 2019
2 parents a07f141 + 12cef7b commit 4a2dc4c
Show file tree
Hide file tree
Showing 3 changed files with 1,577 additions and 1,239 deletions.
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ module.exports = function (grunt) {
// load all grunt tasks
require('load-grunt-tasks')(grunt);

// passing in port as input
SERVER_PORT = grunt.option('port') || 8000;

// We do not want the default behavior of serving only the app folder.
// Instead we want to serve the base repo directory, as this will give us
// access to the test dir as well. Further, if you don't have a homescreen
Expand Down
6 changes: 2 additions & 4 deletions devEnv/js/devenv-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ if (typeof XMLHttpRequest !== 'undefined'){

var _ = require('../libs/underscore.js');

exports.rootpath = 'http://localhost:8000';

/**
* Get the path to the framework's formDef.json file. Returns:
*
Expand Down Expand Up @@ -112,7 +110,7 @@ exports.postFile = function(path, content, callback) {
if (request.post !== undefined) {
request.post(
{
uri: exports.rootpath + '/' + path,
uri: '/' + path,
body: content
},
callback);
Expand All @@ -128,7 +126,7 @@ exports.postBase64File = function(path, content, callback) {
if (request.post !== undefined) {
request.post(
{
uri: exports.rootpath + '/' + path,
uri: '/' + path,
body: content,
headers: {
'Content-Type': 'application/octet-stream'
Expand Down
Loading

0 comments on commit 4a2dc4c

Please sign in to comment.