Skip to content

A basic template for building a MEN-Stack app using session-based authentication.

Notifications You must be signed in to change notification settings

SEI-Remote/men-stack-session-auth-template

Repository files navigation

MEN Stack with Session Auth Template

This is a MEN Stack session auth template.

Use this to go build things! 🚀

To Use This Template

Replace <name-of-your-app-here> (including the < and >) in the commands below with the name of your app!

git clone https://github.com/SEI-Remote/men-stack-session-auth-template.git <name-of-your-app-here>
cd <name-of-your-app-here>

Once you are in the project directory:

rm -rf .git

Here's what your command line output should like after this step (note that the indicator that we are in a git repository is gone!)

The command line before and after running the rm -rf .git command. Before git:(main) is visible indiating that the directory contains a git repository, after the command it is not.

Re-initialize a git repository:

git init

Create a repo for this project on GitHub and add that remote to your project with git remote add origin Your-repo-URL-here.

Run npm i to fetch the template's dependencies:

npm i

touch a .env file:

touch .env

Fill it with the following:

DATABASE_URL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SESSION_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Replace the DATABASE_URL and SESSION_SECRET with values that you provide.

Delete this README.md file and finally, make an initial commit:

git add .
git commit -m "initial commit"
git push origin main

You're done!

About

A basic template for building a MEN-Stack app using session-based authentication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published