We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to build an OData backend/service for vue component with Node js & Express ?

Hello Syncfusion.


I'm trying the vue component but dont have any idea about how to build remote service. These clearly my questions:


  • Can I use a standard REST API build with Node/Express Js as backend for vue component ?
  • If not, have you any sample to build OData service/backend for the vue components ?
  • Any libs suggestions to build OData service ?


Please, thank for your reply.


3 Replies

GM Gopinath Munusamy Syncfusion Team October 28, 2022 06:09 AM

Hi Justin,


Greetings from Syncfusion support.


We have prepared a ODataV4Adaptor sample to achieve your requirement. In this sample we have assigned the ODataV4Adaptor using the adaptor property of DataManager. We have attached the sample and code snippets for your reference. Please check the below sample and documentation for more details,

Code snippets:

[App.Vue]

import { DataManager, ODataV4Adaptor } from '@syncfusion/ej2-data';

//…

dataSource: new DataManager({

        url: 'http://localhost:50728/odata/Books',

        adaptor: new ODataV4Adaptor,

    }),


Please refer the below Online Documentation link to learn more about this. 


Online Documentation: https://ej2.syncfusion.com/vue/documentation/data/adaptors/#odatav4-adaptor


Please refer the below sample for more details,

Front-End: https://www.syncfusion.com/downloads/support/forum/178473/ze/Odatav4adaptor1803154094.zip

Back-End: https://www.syncfusion.com/downloads/support/forum/178473/ze/Gantt_ODataV4Adaptor420909839-1917504632.zip

Please contact us if you require any further assistance. 


Regards,

Gopinath M



YJ Y. Justin October 28, 2022 07:05 AM

Ok. Thank for your reply.


I really appreciate it. The problem is that i'm searching for a solution to build the OData V4 backend with a Node Js base lib or framework.



GM Gopinath Munusamy Syncfusion Team November 1, 2022 08:42 AM

Hi Justin,


You’re most Welcome.

We have checked your query and we suggest you to refer these below Package and GitHub links to achieve your requirement. Please check these below links for more details,

Package Link: https://www.npmjs.com/package/odata-v4-server.

GitHub Link: https://github.com/jaystack/odata-v4-server

Please get back to us if you require any further assistance on this.



Regards,

Gopinath M


Loader.
Live Chat Icon For mobile
Up arrow icon