Coder Social home page Coder Social logo

basicserviceframework's Introduction

BasicServiceFramework

基于express,mongodb,mysql的基础框架

####运行环境 linux,macOS

####安装

本框架涉及了mongodb,redis,mysql等数据库服务,首先确认他们都已经正确安装。 若无安装则可以先下载linux环境有名的包管理工具HomeBrew(http://brew.sh/)。

安装完HomeBrew 则分别执行

Brew install node
Brew install mongodb
Brew install redis
Brew install mysql

####启动服务 接着我们要开启这些数据库服务

启动redis

sudo redis-server /usr/local/etc/redis.conf

启动mysql

sudo mysql.server start

启动mongodb,首先要在系统根目录建数据库文件 data/db

sudo mongod

####服务器运行

我们在本机运行环境使用了nodemon作为node进程管理(自动重启)(http://nodemon.codeplex.com/), express(http://www.expressjs.com.cn/)作为web框架

建议在这里用npm安装为全局的

sudo npm install express -g
sudo npm install nodemon -g

然后我们还要安装依赖包,切换到程序根目录,执行

sudo npm install

最后执行

sudo nodemon app.js

不出意外的话你的服务已经正常跑起来了~

持续集成中

basicserviceframework's People

Contributors

cjddny avatar

Stargazers

 avatar

Watchers

 avatar  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.