/node-FileToBit

Transforming files to bit and storaging it in PostgreSQL using Multer and Sequelize

Primary LanguageCSSMIT LicenseMIT

Node - Upload file and save it in a Database

Few steps for creating a simple HTML + NodeJS/Express + Multer + Sequelize upload file example.

If you need help, call me: Twitter, Medium

What I need ?

  • SublimeText or other file editor
  • NPM
  • Node JS
  • Express, node network app framework
  • Multer, middleware for handling multipart/form-data
  • Sequelize to save our file
  • Local database or in a storage service ( like Amazon, Heroku and etc... )

Installation

Download the project, and inside the main folder, just run the follow command for dependences installation

$ npm install

Database

Follow the instructions on index.js file inside server/models folder. If you don't know how to create a hosted database, click here and I will help you

Test

In app.js file, I configurated the http PORT to 3000, you can change as you wanted, so, in this example, when start this example, it will be released in localhost:3000 address :)

You can check if your encode/decode image to bit is working by accessing localhost:3000/gallery ;)

So, open your favorite Terminal and run these command.

$ node app

Todos

Give me some ideias :P

License

MIT

Free Software, Free Examples, Free hugs!