/curriculums

Academic curriculums (Mallas curriculares)

Primary LanguageJavaScriptMIT LicenseMIT

Curriculums

Build Status david Docker Pulls

This repository contains the curriculums of Pontifical Catholic University of Chile as JSON to allow students to create applications.

This is community maintained. So pull-requests are welcome 😄

How to use?

As static page on Github pages

The main branch is gh-pages to allow Github to serve all this files as static assets.

You can take individual JSON following the project directory structure.

Root: https://acm-planner.github.io/curriculums

Example:

The file static/pregrado/ingenieria/2009/civil-computacion.json can be accessed at:

https://acm-planner.github.io/curriculums/static/pregrado/ingenieria/2009/civil-computacion.json

As NPM Module

npm install --save ACM-Planner/curriculums#gh-pages

Usage:

'use strict';

const curriculums = require('curriculums');
const data = curriculums();

console.log(data);

Under the hood it uses fs and JSON parsing, so this may require additional setup when using with webpack.

As Express.js HTTP API server

Get this code and install dependencies:

git clone https://github.com/ACM-Planner/curriculums.git
cd curriculums
npm install express cors morgan
npm install

Start server at port 8000:

npm start

Visit http://localhost:8000.

This will work identically as the gh-pages version. So the following route is available:

http://localhost:8000/static/pregrado/ingenieria/2009/civil-computacion.json

To get all the curriculums you can perform a GET to:

http://localhost:8000/tree

Testing

Currently we are only testing the Express.js server. We need to support JSON Schema validations.

Make sure to run before:

npm install express cors morgan

Run test suite:

npm test