├── public ├── scripts │ └── app.js └── styles │ └── style.css ├── README.md ├── server └── index.js ├── .gitignore ├── views └── index.html └── package.json /public/scripts/app.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Image Upload Client-Side with Cloudinary 2 | 3 | 1. `git clone` this repo 4 | 2. `npm install` 5 | 3. `npm start` 6 | 4. You're ready to upload dank memes. 7 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var mustacheExpress = require('mustache-express'); 3 | var path = require('path'); 4 | 5 | var app = express(); 6 | 7 | // Middleware 8 | app.engine('html', mustacheExpress()); 9 | app.set('view engine', 'mustache'); 10 | app.use('/public', express.static('public')); 11 | 12 | // Routes 13 | app.get('/', function(req, res) { 14 | res.render('index.html'); 15 | }); 16 | 17 | app.listen(1337, function() { 18 | console.log('Running on port 1337'); 19 | }); 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /views/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |