Giter Site home page Giter Site logo

api-sigarra's Introduction

API - SIGARRA

Build Status GitHub issues GitHub license

This API aims to provide access to information present on FEUP's websystem SIGARRA, such as menus of the faculty's restaurants and bars, ERASMUS' vacancies, access to your personal information, timetable visualisation, and more. We use technologies such as NodeJS, Express, Mocha and Chai. Made with ❤️ by NIAEFEUP.

Installation

Prerequisites

Installing Docker

The best approach to install docker is to follow the offical guide here.

Please follow the steps in Install using the repository section.

Next, follow these steps to configure docker access with non sudo permissions in the Manage Docker as a non-root user section.

Installing Docker Compose

The best approach to install docker-compose is to follow the offical guide here.

Usage

Development

To start developing, you must create a file .env with environment variables, which are explained in more detail below.

After creating the .env file, you must build a dev server.

./dev.sh --build 

If you have already built the images/containers before you can simply run:

./dev.sh 

The dev.sh file is available in the project's root folder

This will create a development server with hot reloading which will listen on http://localhost:3000 by default, unless you specify another port.

Testing

To run the test suite, the workflow is similar to the development one.

./test.sh --build 

If you have already built the images/containers before you can simply run:

./test.sh 

The test.sh file is available in the project's root folder

Production Environment

The production environment is created by doing:

./prod.sh --build 

If you have already built the images/containers before you can simply run:

./prod.sh 

The prod.sh file is available in the project's root folder

This environment doesn't have hot reloading and is made to be used in the main server which is running this aplication.

Env File Specification

  • HOST_PORT= The port where you will access in your machine (http://localhost:<HOST_PORT>)
  • CONTAINER_PORT= The port where the app will run inside the container (Can be the same as HOST_PORT)
  • MONGO_URI= [Optional] Specify a URI for an external mongo database

Project Details

This project uses Node.js with Express.js for the API routing and request-response logic. The DBMS used is Mongo, using Mongoose for the Node.js connection.

The testing is done with Mocha and Chai.

License

GNU General Public License v3.0

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.