Skip to content

An application to be used as example and base for any NodeJS developer trying to use the parser

License

Notifications You must be signed in to change notification settings

nohorbee/raml-parsing-base-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAML Parsing Base Project

About

A minimal NodeJS example and base application using the RAML JScript Parser.

Use this application if you are intending to start a NodeJS RAML project that requires parsing capabilities.

Also use this application if you are trying to figure out how to use the parser.

Hands On

  1. Clone this repo (if interested on keeping your copy up-to-date or planning contributing to it) or download the code and create your own repo (if you are interested in using this code as base for your own project).
  2. npm install on the project root folder.
  3. cd src
  4. node app.js

The output you see, is the result of parsing src/example/example.raml

Motivation

I noticed that many developers have doubts at the moment of starting a project. Shall this project work as a starting point to avoid the white-paper syndrom.

Some explanation

  • src/app.js:

    var ramlParser = require('raml-parser');
    ramlParser.loadFile("./examples/example.raml").then(function(data) {
      console.log(data);
    }) ;
    

    After getting an instance of the "raml-parser" module, loadFile(path) parses the file specified by "path" and invokes the anonymous function passing the parsing result to the "data" parameter.

  • src/examples/example.raml: Sample RAML file. You might want to change this file, although, most probably, RAML file will be specified by your application's client.

Doesn't covered

It's still pending to add some sample tests for the base application.

About

An application to be used as example and base for any NodeJS developer trying to use the parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published