Skip to content

Releases: krgamestudios/MERN-template

v1.5.1 - Feeling Good

03 May 00:01
Compare
Choose a tag to compare

It's time for an official update!

Following the sale of the flagship game that this template was built for, I'm adding a few last additions including configurable port numbers to support the new dev setup. This is WAY overdue, but I'm cautiously optimistic that this is the last hurdle. Now, it just comes down to copy/pasting everything into their branch.

I will continue to support this project with critical updates, and I may use it again in the future. It's seriously not a bad engine, all things considering, and I'm quite proud of it.

What's Changed

  • Implemented PAGE_SIZE from news-server (thanks @eels)
  • Fixed a date API bug in the token provider, mirrored to auth-server
  • Added database port number to configuration for ALL services, and the dummy server connection (this repo)
  • Dependency updates

Related Service Releases

Full Changelog: v1.4.0...v1.5.1

v1.4.0 - Bumping Version Numbers Just Because

31 Dec 19:22
Compare
Choose a tag to compare

Bumping every MERN-template component version number, because it's a new year.

new-server v1.6.0
auth-server v1.7.0
chat-server v1.4.0

BREAKING CHANGE: Now using cookies for authentication

27 Jul 17:45
Compare
Choose a tag to compare

Changes

  • To increase security, this project now stores the JWT refreshToken in a HttpOnly cookie. This means the refreshToken is no longer accessible via authTokens.
  • All pre-packaged microservices are in need of an update to remain compatible, and some minor code tweaks are needed (see below).
  • configure-script.js now produces a docker-compose.yml which does not contain HOOK_POST_VALIDATION for the auth server - this has been replaced with HOOK_POST_VALIDATION_ARRAY which requires a JSON array.

Notes

I've plugged a potential security hole, which could have compromised user accounts - no evidence of such an attack is present, but it's the same reason we wear seatbelts: "Just In Case". Instructions on how to update forks of the MERN-template repository are detailed below.

Another change to the auth-server is the removal of the HOOK_POST_VALIDATION environment option and addition of HOOK_POST_VALIDATION_ARRAY - this is a pretty simple fix. Either re-run configure-script.js, or alter your docker-compose.yml as such:

Before:

    HOOK_POST_VALIDATION=http://example.com/hook

After:

    HOOK_POST_VALIDATION_ARRAY=["http://example.com/hook"]

How to Support Cookies

  1. Replace the file /client/pages/utilities/token-provider.jsx with the latest version.

  2. Alter /client/pages/accounts/login.jsx by:

  3. (Optional) Either force your users to clear their browser cache/cookies, or add the following snippet of code to the App function in /client/pages/app.jsx:

const App = props => {
	const authTokens = useContext(TokenContext);

	//compatability - remove the refresh token + reload the page = make the user login again
	if (localStorage.getItem('refreshToken')) {
		localStorage.clear();
		window.location.reload();
	}

	...

Closing Thoughts

My primary goal with the MERN-template is to support the development of my game Egg Trainer. However, I'd be really happy if people used it, or parts of it, for other games or websites. As such, I'm keeping it up to date as best I can.

If you have any issues with updating your code, or the microservices, please feel free to reach out to me either in a github issue or via email.

v1.2.1

30 May 05:23
Compare
Choose a tag to compare
  • Updated the dependencies
  • Cleaned up a bit of cargo coding - "Access-Control-Allow-Origin" was scattered throughout the client, when actually it's the SERVER that is supposed to send it to the CLIENT. I removed those, since I know better now.
  • Added timestamps to the chat window (supports time today, date this year or lists year posted)
  • @kcampbelljr contributed some MacOS support code

v1.2.0

30 Dec 13:27
Compare
Choose a tag to compare

This update removes all client-side markdown rendering, which was slowing the template down by an incredible amount.

The new-server will add a new field called "rendered" to requests for the body - this will contain the string with rendered HTML. So in theory, the news-server should remain backwards compatible.

Configuration Improvements

20 Dec 07:17
Compare
Choose a tag to compare

This is a minor release with some major configuration improvements.

  • HTTP now automatically redirects to HTTPS (you'll need to re-run configure-script.js to regenerate docker-compose.yml)
  • Upgraded webpack-dev-server to 4.6.0 (this eliminates the last warnings that were annoying me during compilation)
  • Lots of library updates in package-lock.json
  • Removed source maps from production builds by default

I've bumped the minor version number to indicate that I highly recommend this version to anybody who is new. I also recommend looking through the diffs to see what changes I've made, for anyone who is upgrading from 1.0.x

Config Fixes and GZIP Compression

24 Aug 07:06
Compare
Choose a tag to compare

I've been tweaking configurations, and enabled gzip compression for the production build of the template.

I've also rearranged the client page structure to be more logical, rather than simply "pages" and "panels".

Finally, you no longer need to have a valid token to logout - this fixes a lingering bug.

Password Recovery

28 Jul 14:42
Compare
Choose a tag to compare

Password recovery should now be fully functional.

Edit: There's a quirk in dev mode: when being redirected by the emailed link, you must change HTTPS to HTTP for your local dev machine.

Quick Fix For The Chat Reporting

23 Jul 11:26
7a48780
Compare
Choose a tag to compare

Client-side code couldn't handle the id -> index rename, so this release should fix that.

Minor Upgrades

23 Jul 10:38
Compare
Choose a tag to compare

I've been working on a private fork of the MERN-template to produce a game called Egg Trainer (which you can see here), and I've imported a bunch of improvements from that private fork into this project and it's services. So there's no major changes in how the template works, but I have updated a lot of the libraries used in it.