Commit 0702815a by sanjay-patel-1991 Committed by Vishal Kadam

First commit to DGI

parent eb811153
......@@ -51,7 +51,7 @@ module.exports = function(grunt) {
}
},
concurrent: {
tasks: ['nodemon:local', 'watch'],
tasks: ['nodemon:local', 'watch','ngserver'],
options: {
logConcurrentOutput: true
}
......@@ -120,16 +120,19 @@ module.exports = function(grunt) {
},
src: ['node_modules/**', 'package.json', 'server.js', 'server/**', 'public/**', '!public/js/**', '!public/modules/**/*.js']
}
},
nginx: {
options: {
config: 'nginx.conf'
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['devUpdate', 'bower', 'jshint', 'jsbeautifier:default']);
grunt.registerTask('server', ['bower', 'jshint', 'minify', 'concurrent']);
grunt.registerTask('server:prod', ['nodemon:prod']);
grunt.registerTask('server:prod', ['nodemon:prod']);
grunt.registerTask('minify', 'Minify the all js', function() {
var done = this.async();
......@@ -138,6 +141,13 @@ module.exports = function(grunt) {
done();
});
grunt.registerTask('ngserver', 'Nginx server', function() {
grunt.file.mkdir('logs/log');
grunt.file.mkdir('temp/client_body_temp');
grunt.file.write('mime.types');
grunt.task.run(['nginx:start']);
});
grunt.registerTask('release', 'Create release package', function() {
var done = this.async();
git.short(function(str) {
......
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 8071;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
root public;
location / {
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://162.249.6.39:21000/api;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80error
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
......@@ -55,6 +55,7 @@
"grunt-jsbeautifier": "^0.2.6",
"grunt-nodemon": "^0.4.0",
"grunt-shell": "^1.1.1",
"load-grunt-tasks": "^3.1.0"
"load-grunt-tasks": "^3.1.0",
"grunt-nginx": "~0.2.2"
}
}
<!doctype html>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" itemscope="itemscope" itemtype="http://schema.org/Product">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>DGI</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/sticky-footer-navbar.css">
<link rel="stylesheet" href="/css/common.css">
<link rel="stylesheet" href="/css/details.css">
<link rel="stylesheet" href="/css/lineage.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon">
<script src="lib/jquery/dist/jquery.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="lib/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="lib/angular-cookies/angular-cookies.js"></script>
<script src="lib/angular-resource/angular-resource.js"></script>
<script src="lib/angular-route/angular-route.js"></script>
<script src="lib/angular-sanitize/angular-sanitize.js"></script>
<script src="lib/angular-ui-router/release/angular-ui-router.js"></script>
<script src="lib/angular-ui-utils/ui-utils.js"></script>
<script src="lib/lodash/lodash.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="http://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.js"></script>
<script src="dist/app.min.js"></script>
<body>
<header class="navbar navbar-static-top navbar-top" data-role="navigation">
<div class="container" data-ng-include="'/modules/home/views/header.html'"></div>
</header>
<div class="content">
<div data-ng-include="'/modules/notification/views/notifications.html'"></div>
<div data-ui-view></div>
</div>
<footer class="footer navbar-bottom">
<div class="container">
<p align="right">Powered by<img src="modules/home/img/logo-green.png"></p>
</div>
</footer>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment