Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Gulpfied #146

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ before_install:
- docker run -d --network="container:$varA" mongo
- docker build -t ethereumclassic/explorer .
- docker run -d --network="container:$varA" ethereumclassic/explorer app.js
before_script: npm install -g gulp
script:
- npm run test
- gulp build
- npm run test
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ FROM node:latest

COPY . /

RUN npm install -g gulp-cli
RUN npm i
RUN gulp build

EXPOSE 3000

Expand Down
14 changes: 12 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,21 @@ app.set('port', process.env.PORT || 3000);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

app.use(favicon(__dirname + '/public/favicon.ico'));
var distdir = 'dist';

if (process.env.DIST && ['dist', 'public'].indexOf(process.env.DIST) > 0) {
distdir = process.env.DIST;
console.log('distdir = ' + distdir);
}

// setup settings.development = process.env.NODE_ENV
config.settings["development"] = app.get('env');

app.use(favicon(__dirname + '/' + distdir + '/favicon.ico'));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, distdir)));

// app libraries
global.__lib = __dirname + '/lib/';
Expand Down
Loading