This sample shows how a Linx REST Service can be used as the backend to a static website. It allows for user registrations, logins and user info updates. The website uses Javascript to communicate with the REST service and does not require any server-side scripting.
- MySQL Database Server
- Run SQL scripts
- Setup ODBC
-
Open Solution
-
Open Settings
a. Add a connection string to the database in the ConnectionString setting
b. Add a random string in the BearerSecret setting
c. Change the CORSOrigin setting to point to your website server URL (e.g. http://localhost)
- Copy website files to a folder of your choice
- Right-click on the index.html file and open in a browser of your choice
OR
- Browse to the website using a local webserver
Description: The example website includes user registration, login and updating user info
Usage:
- Debug WebSiteBackendRESTHost Service in the Linx Designer
- Open index.html in browser
- Register a user
- Login to site
- Change user info