Giter VIP home page Giter VIP logo

api's Introduction

A simple app for s2it

##REQUERIMENTS php7.1, Mysql, Curl, Apache

##HOWTO (linux) apt-get update && sudo apt-get upgrade sudo apt-get install apache2 -y sudo apt-add-repository ppa:ondrej/php sudo apt-get update; sudo apt-get install php7.1; sudo apt-get install mysql-server php7.1-mysql; (username must be "root" and password must be "admin") sudo service apache2 restart; sudo service mysql restart;

##FIRST STEPS #1. Create a database called "teste"; #2. Clone the app #3. Create an .env file in the root of app, then insert line "DATABASE_URL=mysql://root:[email protected]:3306/teste" #4. Execute composer install #5. Run "php bin/console doctrine:migration:migrate" #6. Start the server running "php -S 127.0.0.1:8000 -t public/" (in the app folder)

##APP Open http://127.0.0.1:8000 in a browse then upload the people.xml and shiporders.xml files respectively

##API Create an user for api INSERT INTO user VALUES(null,"name1",'{"role":"ROLE_ADMIN"}',"1234kasokd","admintesttoken");

In order to fetch people
curl -H "X-AUTH-TOKEN:admintesttoken" http://127.0.0.1:8000/api/people/{peopleId}

In order to fetch item
curl -H "X-AUTH-TOKEN:admintesttoken" http://127.0.0.1:8000/api/item/{itemId}

In order to fetch shiporders
curl -H "X-AUTH-TOKEN:admintesttoken" http://127.0.0.1:8000/api/shiporder/{shiporderId}

api's People

Contributors

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