Compare commits

..

7 Commits

Author SHA1 Message Date
64b0a2deb7 1.0.5 2016-08-03 12:05:18 +02:00
9b661c0ee5 update types versions 2016-08-03 12:05:03 +02:00
8ca91a48e8 1.0.4 2016-08-02 23:58:47 +02:00
39a5683b9e improve snippets 2016-08-02 23:58:00 +02:00
7967334e7d 1.0.3 2016-08-02 23:50:48 +02:00
5a875d1e22 Merge branch 'master' of gitlab.com:pushrocks/smartnginx 2016-08-02 23:48:30 +02:00
a533fa5de1 Add license 2016-07-25 01:53:33 +00:00
4 changed files with 33 additions and 10 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Lossless GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,5 +1,6 @@
"use strict"; "use strict";
const plugins = require("./smartnginx.plugins"); const plugins = require("./smartnginx.plugins");
const paths = require("./smartnginx.paths");
exports.getBaseConfigString = () => { exports.getBaseConfigString = () => {
let baseConfig = plugins.smartstring.indent.normalize(` let baseConfig = plugins.smartstring.indent.normalize(`
user www-data; user www-data;
@ -63,7 +64,7 @@ exports.getBaseConfigString = () => {
# Virtual Host Configs # Virtual Host Configs
## ##
include /etc/nginx/conf.d/*.conf; include ${paths.nginxHostFileBase}/*.conf;
include /etc/nginx/sites-enabled/*; include /etc/nginx/sites-enabled/*;
} }
daemon off; daemon off;
@ -85,8 +86,8 @@ exports.getHostConfigString = (hostNameArg, destinationIpArg) => {
server { server {
listen *:443 ssl; listen *:443 ssl;
server_name ${hostNameArg}; server_name ${hostNameArg};
ssl_certificate /LE_CERTS/${hostNameArg}/fullchain.pem; ssl_certificate ${paths.nginxCertBase}/${hostNameArg}/fullchain.pem;
ssl_certificate_key /LE_CERTS/${hostNameArg}/privkey.pem; ssl_certificate_key ${paths.nginxCertBase}/${hostNameArg}/privkey.pem;
location / { location / {
proxy_pass http://${hostNameArg}; proxy_pass http://${hostNameArg};
@ -99,4 +100,4 @@ exports.getHostConfigString = (hostNameArg, destinationIpArg) => {
`); `);
return hostConfig; return hostConfig;
}; };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5zbmlwcGV0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bmdpbnguc25pcHBldHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHNCQUFzQixDQUFDLENBQUE7QUFDckMsMkJBQW1CLEdBQUc7SUFDaEMsSUFBSSxVQUFVLEdBQUcsT0FBTyxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7RUFrRXJELENBQUMsQ0FBQztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUM7QUFDbkIsQ0FBQyxDQUFBO0FBR1UsMkJBQW1CLEd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0FBVyxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUM7YUFDMUMsV0FBVztZQUNaLGdCQUFnQjs7Ozs7aUJBS1gsV0FBVzs4QkFDRSxXQUFXOzs7OztpQkFLeEIsV0FBVztxQkFDUCxLQUFLLENBQUMsYUFBYSxJQUFJLFdBQVc7eUJBQzlCLEtBQUssQ0FBQyxhQUFhLElBQUksV0FBVzs7O3dCQUduQyxXQUFXOzs7Ozs7O0VBT2pDLENBQUMsQ0FBQztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUM7QUFDbkIsQ0FBQyxDQUFDIn0=

View File

@ -1,6 +1,6 @@
{ {
"name": "smartnginx", "name": "smartnginx",
"version": "1.0.2", "version": "1.0.5",
"description": "control nginx from node, TypeScript ready", "description": "control nginx from node, TypeScript ready",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
@ -22,8 +22,8 @@
}, },
"homepage": "https://gitlab.com/pushrocks/smartnginx#README", "homepage": "https://gitlab.com/pushrocks/smartnginx#README",
"dependencies": { "dependencies": {
"@types/q": "^0.0.27", "@types/q": "0.x.x",
"@types/shelljs": "^0.3.27", "@types/shelljs": "0.x.x",
"beautylog": "^5.0.18", "beautylog": "^5.0.18",
"cert": "1.0.6", "cert": "1.0.6",
"q": "^1.4.1", "q": "^1.4.1",

View File

@ -1,4 +1,5 @@
import * as plugins from "./smartnginx.plugins"; import * as plugins from "./smartnginx.plugins";
import * as paths from "./smartnginx.paths";
export let getBaseConfigString = () => { export let getBaseConfigString = () => {
let baseConfig = plugins.smartstring.indent.normalize(` let baseConfig = plugins.smartstring.indent.normalize(`
user www-data; user www-data;
@ -62,7 +63,7 @@ export let getBaseConfigString = () => {
# Virtual Host Configs # Virtual Host Configs
## ##
include /etc/nginx/conf.d/*.conf; include ${paths.nginxHostFileBase}/*.conf;
include /etc/nginx/sites-enabled/*; include /etc/nginx/sites-enabled/*;
} }
daemon off; daemon off;
@ -86,8 +87,8 @@ export let getHostConfigString = (hostNameArg:string,destinationIpArg:string) =>
server { server {
listen *:443 ssl; listen *:443 ssl;
server_name ${hostNameArg}; server_name ${hostNameArg};
ssl_certificate /LE_CERTS/${hostNameArg}/fullchain.pem; ssl_certificate ${paths.nginxCertBase}/${hostNameArg}/fullchain.pem;
ssl_certificate_key /LE_CERTS/${hostNameArg}/privkey.pem; ssl_certificate_key ${paths.nginxCertBase}/${hostNameArg}/privkey.pem;
location / { location / {
proxy_pass http://${hostNameArg}; proxy_pass http://${hostNameArg};