Memories is an app to post photos and captions of our memories. It's a Fullstack MERN App.
- The API on
/serverdirectory is a Node Express app using MongoDB as database. - The client app on
/clientdirectory is a ReactJS app (set up with Vite) with Redux for state management and TailwindCSS + Material Design Icons for styling.
All the dependencies of both apps (Express & React) are listed in the package.json file in their root directory (/server/package.json & /client/package.json)
-
First installing the Express app: 1. Go to the
/serverdirectory:cd server2. Run the commandnpm installto install all the required dependecies locally. 3. Create a file named.envon root directory (/server) and fill it as the .env.examplefile with your own environment variables (here your MongoDB connection string) 4. Run the commandnpm run dev(in development) ornpm start(in production) to launch the server. -
Then install the React app: 1. Go to the
/clientdirectory:cd client2. Run the commandnpm installto install all the required dependecies locally. 3. Paste your running server root path (e.g.http://localhost:5000) to the "proxy" property in thepackage.jsonfile 4. Paste<your_server_root_path>/postsinto the/src/api/index.jsfile atline:3in place of the default path (don't mind about changing it if it's already the same). At this step your package.json file should look like this:"author": "dRect911", "private": true, "version": "0.0.1", "proxy": "https://memories-backend.onrender.com",and your
/src/api/index.jsshould look like this:import axios from 'axios'; const url = 'https://memories-backend.onrender.com/posts';
- Run the command
npm run dev(in development) ornpm run build(in production) to launch the app.
At this point you might be done and able to check the app on the react output link t perform different actions such as create or edit a post.
Issue Tracker: https://github.com/dRect911/mern-stack-memories/issues