/product

Primary LanguageJavaScript

MREN Stack

Les outils et technologies utilisés :

 - [MongoDB](https://www.mongodb.com/home)

 - [Reactjs](https://reactjs.org/)

 - [Express](https://expressjs.com/)
 
- [Nodejs](https://nodejs.org/en/download/)

Démarrage rapide

Install dependencies for server

npm install

Install dependencies for client

npm run client-install

Run the client & server with concurrently

npm run dev

Run the Express server only

npm run server

Run the React client only

npm run client

create schema

 image{
    type: string
    require:"message"
 }

Create image using multer

  npm install --save multer

exemple

<form action="/stats" enctype="multipart/form-data" method="post">
 <div class="form-group">
   <input type="file" class="form-control-file" name="uploaded_file">
   <input type="text" class="form-control" placeholder="Name" name="name">
   <input type="submit" value="Upload" class="btn btn-default">            
 </div>
</form>

File information

Each file contains the following information:

Key Description Note
fieldname Field name specified in the form .
originalname Name of the file on the user's computer .
encoding Encoding type of the file .
mimetype Mime type of the file .
size Size of the file in bytes .
destination The folder to which the file has been saved .DiskStorage
encoding Encoding type of the file .
filename The name of the file within the destination .DiskStorage
path The full path to the uploaded file .DiskStorage
buffer A Buffer of the entire file MemoryStorage .

Server runs on http://localhost:6000 and client on http://localhost:3000

Author ELHADRI Nadia