This solution was created to demonstrate a fully fledged backend application built with the low-code platform Linx including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Linx community style guides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
General functionality:
- Authenticate users via JWT
- CRU* users (sign up)
- CRUD Articles
- CR*D Comments on articles (no updating required)
- GET and display paginated lists of articles
- Favorite articles
- Follow other users
This implementation makes use of a MySQL database for data persistence.
The documentation for the API can be found here.
The below steps describe how to setup the sample to run on your local Linx Designer environment.
- Download and install the Linx Designer here.
- Open the sample Solution (.lsoz) in your Linx Designer.
- Alter the below Solution Settings:
LinxIsLocalDevEnv
:True
- Select the RESTHost service, right click and select debug. Once initialised, start the debugger.
- Once the debugger has started, you are able to make requests locally to:
https://localhost:8080/realworld
The below steps describe how to host this Solution on your own Linx cloud server environment.
This solution runs on a Linx cloud server instance and integrates with a hosted MySQL database.
- Register for a Linx trial cloud server and MySQL cloud database here.
- You will receive an email containing your Linx cloud server, drive space and MySQL database credentials when your trial server has been activated.
The Solution uses a MySQL database to store user related credentials.
- Run the provided setup script on your database instance.
- Update the below Setting values in the Linx Solution (these credentials can be found in your server registration email):
DatabasePassword
: Password for your db instanceDatabaseServer
: Your cloud database server name i.e.dev1db.linx.twenty57.net
.
- Log into your cloud server instance and upload the Solution (Top Menu > Server > Upload).
- Open the Solution's Settings and update the
LinxServerHostname
value to reflect your server instance name - for example, if my server ishttps://dev1.linx.twenty57.net
then my instance name is "dev1". - Click Save.
- On the Solution's service dashboard page, start all of the services for the Solution.
DatabaseInstanceName
- Enter database instance name.
DatabasePassword
- Enter password.
DatabasePort
- Enter database port.
DatabaseServer
- Enter database server.
DatabaseUser
- Enter databse user.
JWTExpirySeconds
- Enter expiry in seconds for token
JWTTokenSecretSigningKey
- Any key of your own
- Click Save.
On the Solution's service dashboard page, start the Realworld service.
- Once the service has started, you are able to make requests using the base URL of:
https://{your instance name}.api.linx.twenty57.net/realworld
For questions please ask the Linx community or use the Slack channel.