Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bb1590bae7 | |||
| 5f7b9dda3a | |||
| 051f3dfb2a | |||
| 85456e0892 | |||
| 6130337846 | |||
| ac99f3bf38 | |||
| 20e94db628 | |||
| bcb4a37f5a | |||
| 3b0d3c87b1 | |||
| 51a116503d |
@@ -1,6 +1,8 @@
|
||||
# MERN-template
|
||||
|
||||
A website template using the MERN stack. The primary technology involved is:
|
||||
A website template using the MERN stack. It is geared towards Persistent Browser Based Games (think neopets), but is flexible enough for a number of different uses.
|
||||
|
||||
The primary technology involved is:
|
||||
|
||||
* React
|
||||
* Nodejs
|
||||
@@ -28,7 +30,6 @@ A clean install is this easy:
|
||||
```
|
||||
git clone https://github.com/krgamestudios/MERN-template.git
|
||||
cd MERN-template
|
||||
npm install
|
||||
node configure-script.js
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
@@ -37,7 +37,7 @@ const Account = props => {
|
||||
return (
|
||||
<div className='page'>
|
||||
<h1 className='centered'>Account</h1>
|
||||
<form className='constricted' onSubmit={async evt => {
|
||||
<form className='constrained' onSubmit={async evt => {
|
||||
evt.preventDefault();
|
||||
const [err] = await update(passwordRef.current.value, retypeRef.current.value, contactRef.current.checked, authTokens.tokenFetch);
|
||||
|
||||
@@ -69,7 +69,7 @@ const Account = props => {
|
||||
<button type='submit'>Update Information</button>
|
||||
</form>
|
||||
|
||||
<DeleteAccount className='constricted' />
|
||||
<DeleteAccount className='constrained' />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ const LogIn = props => {
|
||||
return (
|
||||
<div className='page'>
|
||||
<h1 className='centered'>Login</h1>
|
||||
<form className='constricted' onSubmit={
|
||||
<form className='constrained' onSubmit={
|
||||
async evt => {
|
||||
//on submit
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -22,7 +22,7 @@ const Recover = props => {
|
||||
return (
|
||||
<div className='page'>
|
||||
<h1 className='centered'>Recover Password</h1>
|
||||
<form className='constricted' onSubmit={
|
||||
<form className='constrained panel' onSubmit={
|
||||
async evt => { //on submit
|
||||
recoverRef.current.disabled = true;
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -25,9 +25,9 @@ const Reset = props => {
|
||||
return (
|
||||
<div className='page'>
|
||||
<h1 className='centered'>Reset Password</h1>
|
||||
<form className='constricted' onSubmit={async evt => {
|
||||
<form className='constrained panel' onSubmit={async evt => {
|
||||
evt.preventDefault();
|
||||
const [err] = await update(passwordRef.current.value, retypeRef.current.value, query);
|
||||
const [err, redirect] = await update(passwordRef.current.value, retypeRef.current.value, query);
|
||||
|
||||
if (err) {
|
||||
alert(err);
|
||||
@@ -82,7 +82,7 @@ const update = async (password, retype, query) => {
|
||||
if (!result.ok) {
|
||||
return [`${await result.status}: ${await result.text()}`];
|
||||
} else {
|
||||
return [null];
|
||||
return [null, true];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ const SignUp = props => {
|
||||
return (
|
||||
<div className='page'>
|
||||
<h1 className='centered'>Signup</h1>
|
||||
<form className='constricted' onSubmit={
|
||||
<form className='constrained' onSubmit={
|
||||
async evt => { //on submit
|
||||
signupRef.current.disabled = true;
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -28,7 +28,7 @@ const Markdown = props => {
|
||||
}
|
||||
|
||||
return (
|
||||
<ReactMarkdown rehypePlugins={[rehypeRaw]} escapeHtml={false} props={{...props}}>{contentHook}</ReactMarkdown>
|
||||
<ReactMarkdown rehypePlugins={[rehypeRaw]} props={{...props}}>{contentHook}</ReactMarkdown>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mern-template",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mern-template",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.4",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.8",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mern-template",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.4",
|
||||
"description": "A website template using the MERN stack.",
|
||||
"main": "server/server.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user