Git Product home page Git Product logo

100lieux-back's Introduction

SemApps

my-project

This is a SemApps-based semantic application

Quick start

Launch your local Jena Fuseki instance

Jena Fuseki is a semantic triple store. It is where your app's data will be stored.

You need docker and docker-compose installed on your machine.

$ docker-compose up

Jena Fuseki is now available at the URL http://localhost:3030

Please start by creating a localData dataset. This is where your triples will go.

Run Moleculer in dev mode

$ npm run dev

Your instance of SemApps is available at http://localhost:3000

Testing the LDP server

Post an ActivityStreams Note to /resources LDP container:

POST /resources HTTP/1.1
Host: localhost:3000
Content-Type: application/ld+json
Accept: */*
Content-Length: 97

{
 "@context": "https://www.w3.org/ns/activitystreams",
 "type": "Note",
 "name": "Hello World"
}

Retrieve the /resources LDP container:

GET /resources HTTP/1.1
Host: localhost:3000
Accept: application/ld+json

You should get this result:

{
  "@context": {
    "ldp": "http://www.w3.org/ns/ldp#",
    "as": "https://www.w3.org/ns/activitystreams#"
  },
  "@id": "http://localhost:3000/resources",
  "@type": [
    "ldp:Container",
    "ldp:BasicContainer"
  ],
  "ldp:contains": [
    {
      "@id": "http://localhost:3000/resources/db78b000",
      "@type": "as:Note",
      "as:name": "Hello World"
    }
  ]
}

Useful links

NPM scripts

  • npm run dev: Start development mode (with hot-reload & REPL)
  • npm run start: Start production mode

100lieux-back's People

Contributors

tawytest avatar

Watchers

Thomas Lhomme | draft repo avatar James Cloos avatar Sébastien Rosset avatar

100lieux-back's Issues

Plus de jus...

Hello,

J'ai mis auth. seulement voila, rien ne se passe...
(le serveur démarre sans erreur mais les routes n'apparaissent plus dans les logs et j'ai des 404 sur toutes URLs)
Alors j'ai trouvé ce bout de code:

api.service

 dependencies: [
    'ldp',
    'sparqlEndpoint',
    'auth', // j'ai rajouté ca, si je l'enleve les précédentes url fonctionnent mais toujours pas /auth, je ne sais pas si il faut que je le mette
  ],
  async started() {
    [
      ...(await this.broker.call('ldp.getApiRoutes')),
      ...(await this.broker.call('sparqlEndpoint.getApiRoutes')),
      ...(await this.broker.call('auth.getApiRoutes')), // Ajouté ca aussi, un peu au pif...
    ].forEach(route => this.addRoute(route));
  },

D'ailleurs j'ai noté que ce code n'existait pas dans le boilerplate de runner. je ne comprend donc pas comment il charge les modules.

Tu peux m'expliquer?

Merci!

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.