june-backserver
Advanced tools
Comparing version 2.1.0 to 2.1.1
// | ||
// ============== JuNe BackServer 2.1.0 ==============- | ||
// ============== JuNe BackServer 2.1.1 =============== | ||
// | ||
@@ -239,3 +239,3 @@ // Copyright (c) 2024 Eduardo Ruiz <eruiz@dataclick.es> | ||
if(/^post|put|patch$/.test(m)) | ||
this.readBody(req, body.toString('latin1'), !headers['content-type'].startsWith('multipart/form-data')); | ||
this.readBody(req, body.toString('latin1'), !headers['content-type']?.startsWith('multipart/form-data')); | ||
@@ -487,3 +487,3 @@ this.req = req; | ||
bcc && (hdr+= `Bcc: ${bcc}\n`); | ||
hdr+= 'Message-ID: <' + mailBoundary(false, 30).toLowerCase() + '@j_backserver>\nX-Mailer: JuNeBackServer\n'; | ||
hdr+= 'Message-ID: <' + this.mailBoundary(false, 30).toLowerCase() + '@j_backserver>\nX-Mailer: JuNeBackServer\n'; | ||
ip && (hdr+= `X-SenderIP: ${ip}\n`); | ||
@@ -498,3 +498,3 @@ !text && html && (text = html.replace(/(<([^>]+)>)/g, '')) | ||
let bndalt = mailBoundary(), altnxt = mailBoundary(); | ||
let bndalt = this.mailBoundary(), altnxt = this.mailBoundary(); | ||
if(text !== '') | ||
@@ -507,3 +507,3 @@ msg+= `--${altnxt}\n` + ttype.replace('%', 'plain') + `\n${text}\n\n`; | ||
bnd = attach.images[i].bnd = mailBoundary(false); | ||
bnd = attach.images[i].bnd = this.mailBoundary(false); | ||
html = html.replaceAll('cid:' + attach.images[i].code, `cid: ${bnd}`); | ||
@@ -525,3 +525,3 @@ } | ||
type = `Content-Type: multipart/related;\n\ttype="multipart/alternative";\n\tboundary="${bndalt}"\n`; | ||
bnd = mailBoundary(); | ||
bnd = this.mailBoundary(); | ||
} | ||
@@ -536,3 +536,3 @@ } | ||
bnd = mailBoundary(); | ||
bnd = this.mailBoundary(); | ||
if(text !== '') | ||
@@ -539,0 +539,0 @@ msg+= `--${bnd}\n` + ttype.replace('%', 'plain') + `\n${text}\n\n`; |
{ | ||
"name": "june-backserver", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"author": "Eduardo Ruiz <eruiz@dataclick.es> (https://www.dataclick.es)", | ||
@@ -5,0 +5,0 @@ "description": "JuNe BackServer for Router path, JSON Web Token, WebSockets, SSE, APPs or backends", |
<p align="center"> | ||
<img src="logo.png" title="JuNe BackServer" width="300" height="194" /> | ||
<img src="logo.png" title="JuNe BackServer" width="300" height="194"> | ||
</p> | ||
@@ -9,3 +9,3 @@ | ||
# 🏅 8 in1 | ||
# 🏅 8 in 1 | ||
#### 1. Routing endpoints response to client request and Middleware | ||
@@ -25,14 +25,24 @@ #### 2. JSON Web Token with expiration control | ||
✔ Create a HTTP or HTTPS server (IPv4 / IPv6). | ||
✔ Routing for GET, POST, PUT, PATCH, DELETE or (default) and with Middleware. | ||
✔ JSON Web Token auto-updated and integrated for ease of use directly in the backend. | ||
✔ Token expiration or forever. | ||
✔ Ready for files/folder upload (small or large sent with chunks from FileReader). | ||
✔ Email delivery support for all MIME types. | ||
✔ WebSockets (ws and secure wss) and Server-Sent Events protocol (SSE) support. | ||
✔ Captcha (hidden) form security support. | ||
✔ Google Authenticator for Two-factor authentication (2FA). | ||
✔ Send payments to Stripe or PayPal. | ||
✔ Support for HTTP/2. | ||
#### 👉 Try JavaScript framework for frontend [JuNe PaulaJS](https://paulajs.com "JuNe PaulaJS") - [:fa-github: GitHub](https://github.com/EduardoRuizM/june-paulajs "GitHub") | ||
#### 👉 Try JavaScript framework for frontend [JuNe PaulaJS](https://github.com/EduardoRuizM/june-paulajs "JuNe PaulaJS") | ||
#### Also [JuNe WebServer](https://github.com/EduardoRuizM/june-webserver "JuNe WebServer") | ||
@@ -43,3 +53,3 @@ | ||
# [JuNe](https://just-needed.com "JuNe") / JUst NEeded Philosophy | ||
# JuNe / JUst NEeded Philosophy | ||
1. **Source code using less code as possible** | ||
@@ -223,3 +233,3 @@ So you can understand code and find bugs easier. | ||
Variables are received for each chunk using PUT. | ||
Compatible and designed for **[JuNe PaulaJS](https://paulajs.com "JuNe PaulaJS") JavaScript framework** (with examples), although you could also perform the same functionallity in your own frontend with the same variables. | ||
Compatible and designed for **[JuNe PaulaJS](https://github.com/EduardoRuizM/june-paulajs "JuNe PaulaJS") JavaScript framework** (with examples), although you could also perform the same functionallity in your own frontend with the same variables. | ||
@@ -718,3 +728,3 @@ ``` | ||
# [JuNe](https://just-needed.com "JuNe") Development Ecosystem | ||
# JuNe Development Ecosystem | ||
Everything you need to develop your project: | ||
@@ -726,3 +736,3 @@ ### Backend | ||
### Frontend | ||
- [JuNe PaulaJS](https://paulajs.com "JuNe PaulaJS") Powerful JavaScript framework - [:fa-github: GitHub](https://github.com/EduardoRuizM/june-paulajs "GitHub") | ||
- [JuNe PaulaJS](https://github.com/EduardoRuizM/june-paulajs "JuNe PaulaJS") Powerful JavaScript framework | ||
- [JuNe CSS](https://github.com/EduardoRuizM/june-css "JuNe CSS") Full responsive CSS library with icons. |
733
72147