I have a functioning Angular2-Meteor installation.
On top of this, I have installed Restivus via the command
meteor add nimble:restivus
The installation does not show any problem.
Following the example found on the Restivus page (https://github.com/kahmali/meteor-restivus) I have created the first file (logs.collection.ts) to configure the API
import {Mongo} from 'meteor/mongo';
import {Restivus} from 'meteor/numble:restivus';
import {Log} from '../interfaces/log.interface';
export const Logs = new Mongo.Collection<Log>('logs');
function loggedIn() {
return !!Meteor.user();
}
let allowInsert = () => {return false};
let allowUpdate = () => {return false};
let allowDelete = () => {return false}
Logs.allow({
insert: allowInsert,
update: allowUpdate,
remove: allowDelete
});
if (Meteor.isServer) {
// Global API configuration
var Api = new Restivus({
useDefaultAuth: true,
prettyJson: true
});
// Generates: GET, POST on /api/items and GET, PUT, DELETE on
// /api/items/:id for the Items collection
Api.addCollection(Logs);
}
My problem is that the IDE is telling me that it 'cannot find module meteor/numble:restivus'
Any idea about what I have done wrong? Thanks in advance