A template of a file uploader providing the solid foundations for any application that requires the use of a fullstack application with uploading files
Ensure that you have node installed and have downloaded the git repository on your local system, once accomplished, run the following commands in your terminal:
cd <respository_name>
Followed by this ensure you switch into both the client & server cd <client or server>
then run the following command:
npm install
This installs the necessary dependencies for the application to work.
You would also want to ensure that you set up a .env file within the client and server directory that holds the port for your server. Using Vite you would want the name of your environment variable to start with VITE for Vite to be able to recognize it. Ensure that this also in your .gitignore.
Once you have gone through the installation process you can then run both the client and the server by doing:
npm run dev
Ensure that you do this in one terminal where the client is in the scope and another terminal where the server is in scope. This runs both environments being able to have a rendered and operating server and client. You can check the functionality of the server by using postman or a browser and typing http://localhost:3000
and a json containing hello world should appear.
- Drag and Drop File
The file uploads are stored in a local folder called uploads within the server however, general practice is to upload it to a cloud database like AWS S3 but that hasn't been integrated in this template.