https://github.com/ivanparvaresh/sarina-express
Sarina-ExpressJs Plugin
https://github.com/ivanparvaresh/sarina-express
Last synced: about 2 months ago
JSON representation
Sarina-ExpressJs Plugin
- Host: GitHub
- URL: https://github.com/ivanparvaresh/sarina-express
- Owner: ivanparvaresh
- License: mit
- Created: 2016-12-01T12:56:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-01T15:54:26.000Z (over 9 years ago)
- Last Synced: 2025-03-17T16:41:28.533Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Sarina.Express
Sarina Express is plugin to integrate Express web framework with sarina application framework.
Sarina.Express created by [JavadParvaresh](https://github.com/javadparvaresh).
Sarina.Express has build on top of [Express](http://expressjs.com/).
## Table of contents
- [Quick Start](#quick-start)
- [Bugs and feature requests](#bugs-and-feature-requests)
## Quick start
Several quick start options are available:
- Clone the repo: `git clone https://github.com/javadparvaresh/Sarina-Express.git`
- Install with [npm](https://www.npmjs.com): `npm install sarina.express`
## Bugs and feature requests
Have a bug or a feature request? [please open a new issue](https://github.com/javadparvaresh/Sarina-Express/issues/new).
## The Basics
```javascript
var sarina=require("sarina");
var sarinaexpress=require("sarinaexpress");
// create a sarina app by passing configuration
var app=sarina.create({});
app.module(sarinaexpress);
// you can access express library by this service
app.factory("Sample",["sarina.express"],function(express){
// now you have express in your service
var app=express();
});
// or you can access express app by this service
app.factory("Sample",["sarina.express.app"],function(expressapp){
});
// start server easily by using server service
app.exec("run",["sarina.express.server"],function(server){
return {
run:function(resolve,reject){
server.start(3000).then(resolve).catch(reject);
}
}
});
// finally we need to start app
app.start();
```