GithubHelp home page GithubHelp logo

hackathonarchiweb's Introduction

hackathonArchiWeb

FRAMEWORK SAILS.JS (Node.js):

configuration: 1. create config/env/development.js:

//start
module.exports = {

/***************************************************************************

  • Set the default database connection for models in the development *

  • environment (see config/connections.js and config/models.js ) * ***************************************************************************/ connections : { DevServer: { adapter: 'sails-mysql', host: 'localhost', user: 'mysqlUser', //optional password: 'mysqlPass', //optional database: 'DBname', //optional charset : 'utf8', collation : 'utf8_swedish_ci' } },

    port: 1337 };

//start

2. change config/models.js: like

module.exports.models = {

  /***************************************************************************
  *                                                                          *
  * Your app's default connection. i.e. the name of one of your app's        *
  * connections (see `config/connections.js`)                                *
  *                                                                          *
  ***************************************************************************/
  // connection: 'localDiskDb',
  connection: 'DevServer',
  /***************************************************************************
  *                                                                          *
  * How and whether Sails will attempt to automatically rebuild the          *
  * tables/collections/etc. in your schema.                                  *
  *                                                                          *
  * See http://sailsjs.org/#!/documentation/concepts/ORM/model-settings.html  *
  *                                                                          *
  ***************************************************************************/
  migrate: 'alter'

};

3. inside root directory:
	- cmd: npm install
	- cmd: npm install sails-mysql --save : to add mysql adapter for waterline
4. cmd: sails lift 

/////////////////////////
////////TESTING///////////
/////////////////////////
test with POSTMAN

///////RESERVATION////////////
- Add new reservation: POST
	POST http://localhost:1337/reservation?name=resaName&user_id=1
- Show all reservation GET
	GET all reservations http://localhost:1337/reservations
///////////////////////

///////USER////////////
- Add new User: POST
	user : http://localhost:1337/user?firstname=test&lastname=test&[email protected]&password=test&status=active
- Show all user GET
GET http://localhost:1337/user
///////////////////////

///////SHOP////////////

- Add new shopItem: POST
	http://localhost:1337/shop?name=test&status=disponible&price=23.3&image=/link/to/images
- Show all shop items GET
	http://localhost:1337/shop
///////////////////////

///////ARTICLE BLOG////////////

- Add new article: POST
	http://localhost:1337/post?title=title Test&article=article test&image=/link/to/images
- Show all article GET
	http://localhost:1337/post
///////////////////////

///////ARTICLE BLOG////////////

- Add new service: POST
	http://localhost:1337/service?category=restauration&name=nameTest&status=dispo&price=20&image=/link/to/image
- Show all services GET
	http://localhost:1337/service
///////////////////////

///////EVENT ////////////

- Add new event: POST
	http://localhost:1337/service?category=netWorking&name=net working&status=en cours&image=/link/to/image&start_at=05-10-2017&end_at=05-10-2017
- Show all event GET
	http://localhost:1337/event
///////////////////////

////End POSTMAN///

//////////////////////ACCESS BACKOFFICE/////////////////

Url Website:
http://coffeeshop.sur.paris/


sign in with:

email: [email protected]
passwd: AdminPage!


///need authentication to show button "reserver" and reservation

All CRUD Work with:
http://coffeeshop.sur.paris/post //CRUD post
http://coffeeshop.sur.paris/chat //CRUD chat
http://coffeeshop.sur.paris/event //CRUD event 
http://coffeeshop.sur.paris/service //CRUD service item
http://coffeeshop.sur.paris/shop //CRUD shop item

hackathonarchiweb's People

Contributors

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