![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
auto-cms-server
Advanced tools
Auto turn any webpage into editable CMS without coding.
Ctrl
key or Alt
key to show menu404.html
if exists, otherwise send index.html
).env
file.html
title
, meta
, link
from body
into head
Usage with installation to lock the version:
npm i -D auto-cms-server
npx auto-cms-server
Usage without installation:
npx -y auto-cms-server
The LANG
cookie is used to specified the client-preferred language. Possible values are: en
, zh_cn
, and zh_hk
.
The default value can be set in the environment variable AUTO_CMS_DEFAULT_LANG
.
Below is example UI and code to show and set the language:
<form id="langForm">
Language:
<label>
<input type="radio" name="lang" value="en" />
English
</label>
<label>
<input type="radio" name="lang" value="zh_cn" />
簡體中文
</label>
<label>
<input type="radio" name="lang" value="zh_hk" />
繁體中文
</label>
</form>
<script>
{
let lang = new URLSearchParams(document.cookie).get('LANG')
langForm.lang.value = lang
langForm.lang.forEach(input => {
input.addEventListener('change', event => {
if (input.checked) {
document.cookie = 'LANG=' + input.value
location.reload()
}
})
})
}
</script>
Method: POST
Pathname: /contact
Content-Type: application/x-www-form-urlencoded or application/json
Accept: text/html or application/json
Body Fields:
- name
- email
- tel
- company_name
- business_nature
- remark
- extra
All body fields are optional.
If you submit additional fields in the request body, they will be stored as JSON in the extra
field.
If the Accept
is application/json
, the response will be a json object with optional error
string; otherwise the response will be a html page.
The response file can be configured in the env variable SUBMIT_CONTACT_RESULT_PAGE
. If it is not specified, or specified as default
, a simple html page will be response as below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Submitted</title>
</head>
<body>
<p>Your submission has been received.</p>
${error ? `
<pre><code>${escapeHTML(error)}</code></pre>
` : ''}
<p>Back to <a href="/">home page</a>.</p>
</body>
</html>
If you want to implement custom form submission experience, you can do that with AJAX like below example:
<form method="POST" action="/contact" onsubmit="submitContact(event)">
<h1>Contact Form</h1>
<div class="contact-form--field">
<label>
Nickname: <input type="text" name="name" autocomplete="nickname" />
</label>
</div>
<div class="contact-form--field">
<label>
Email: <input type="email" name="email" autocomplete="email" />
</label>
</div>
<div>
<input type="submit" value="Submit" />
</div>
<div class="contact-form--submit-result"></div>
</form>
<script>
async function submitContact(event) {
let form = event.target
let result = form.querySelector('.contact-form--submit-result')
function showResult(text) {
result.textContent = text
}
try {
let formData = new FormData(form)
let params = new URLSearchParams(formData)
let body = params.toString()
event.preventDefault()
let res = await fetch('/contact', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json',
},
body,
})
let json = await res.json()
if (json.error) throw json.error
showResult('Thank you. Your submission is received.')
} catch (error) {
showResult(String(error))
}
}
</script>
This project is licensed with BSD-2-Clause
This is free, libre, and open-source software. It comes down to four essential freedoms [ref]:
FAQs
Auto turn any webpage into editable CMS without coding.
The npm package auto-cms-server receives a total of 0 weekly downloads. As such, auto-cms-server popularity was classified as not popular.
We found that auto-cms-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.