https://github.com/gladchinda/advanced-multer-node-sourcecode
Source code for tutorial on advanced photo upload in Node using Multer and Jimp.
https://github.com/gladchinda/advanced-multer-node-sourcecode
demo expressjs javascript jimp multer nodejs photo-upload tutorial
Last synced: 4 months ago
JSON representation
Source code for tutorial on advanced photo upload in Node using Multer and Jimp.
- Host: GitHub
- URL: https://github.com/gladchinda/advanced-multer-node-sourcecode
- Owner: gladchinda
- Created: 2017-11-27T08:04:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-29T10:25:16.000Z (over 7 years ago)
- Last Synced: 2025-04-14T03:09:29.445Z (9 months ago)
- Topics: demo, expressjs, javascript, jimp, multer, nodejs, photo-upload, tutorial
- Language: JavaScript
- Size: 371 KB
- Stars: 24
- Watchers: 1
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# advanced-multer-node-sourcecode
**You can checkout the complete tutorial on Scotch: [Advanced Photo Upload in Node](https://scotch.io/tutorials/advanced-photo-upload-in-node).**
Source code for tutorial on advanced photo upload in Node using Multer and Jimp. In order to run the demo on your local machine and experiment with the source code, do the following:
- Clone the repository into a new directory on your machine
- Run the following command from the new directory to install the dependencies:
```sh
npm install
```
- Create a `.env` file in the root of the new directory with the following content:
```ini
# Avatar Upload Variables
AVATAR_FIELD=avatar
AVATAR_BASE_URL=/uploads/avatars
AVATAR_STORAGE=public/uploads/avatars
```
- The app will run on port **3000** by default. If you would prefer another port, you can specify it in the `bin/www` file. Look for the following line in the file and replace `'3000'` with your desired port.
```js
var port = normalizePort(process.env.PORT || '3000');
```
- Finally, start the demo app by running the following command:
```sh
npm start
```