Git Product home page Git Product logo

studyjs's Introduction

StudyJS

Here is some JavaScript sample programs I've made when I study Node.js javascript programming.

##Table of Contents

  1. Simple Node Server
  2. Upload Picture
  3. Simple Blog
  4. Contact
  5. Resources

simpleNodeServer

This is the first Node.js based back-end javascript program I've ever made. It's very simple and can receive post request from browser and send back the contents to the end user.

uploadPics

This is a picture uploader base on Node.js and formidable module. To run this, you must first install the formidable package.

npm install formidable

The small application provide 3 pages: start, upload, show. start page provides a file uploader, upload page saves the file user uploaded, show page just shows the picture user uploaded just now.

Blog

Environment: (Node 0.10.33, Express 4.12.1, mongoDB 2.6.8)

Blog is a minimal blog system based on Express. Express is most famous Node.js framwork. To use this, we must first install it by the following command.

$ npm install express-generator -g
$ express -e blog (add ejs engine support)
$ cd blog && npm install
$ DEBUG=blog node ./bin/www

Then, we can check it on the browser with localhost:3000. Done the Express installing.

Installing mongoDB, type the command as follows.

$ vi /etc/yum.repos.d/mongodb.repo 

Write the following configuration (64-bit system)

	[mongodb]
	name=MongoDB Repository
	baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
	gpgcheck=0
	enabled=1

Then, install package with yum command.

	$ yum install mongo-10gen mongo-10gen-server

After this, the mongoDB is installed, then we may use $ cd /bin/ && mongod --dbpath ../blog/ to set the DB storaging directory to /blog and start mongoDB with service mongod start.

⬆ back to top

Contact

Follow me kimen929, mail me at [email protected], or check our my personal home page 金の炎.

Resources

  1. The Node Beginner Book, by Manuel Kiessling
  2. JavaScript 标准参考教程, by 阮一峰
  3. 使用 Express + MongoDB 搭建多人博客, by nswbmw

studyjs's People

Contributors

kimen929 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.