I deployed dart shelf_router server to use as a service for my app.
Everything works fine in terms of service and code.
However, I see occasional (couple times per hour) strange request errors in journalctl logs, that I didn't make.
Why do these…
I attemplted to start a local webserver on Android using Flutter app. I'm using shelf & shelf_static.
I've put index.html file in the assets folder of the root project folder. Then, I referenced it in the pubspec.yaml file.
assets:
-…
This dart server project work successfully when running on my PC.
But when I ran it on the server, I got this.
My server is Ubuntu 20.04 (LTS) x64.
I tried it with this code:
import 'dart:io';
import 'package:shelf/shelf.dart';
import…
I have a flutter app starting a webserver (shelf) on localhost which serves a website and displays the website over webview in the app.
So far it works to display the website over http://localhost:8080/ in webview on Android. But when I try to get…
I'm trying to write tests for my shelf server. And it returns 503 when I make a request in my unit tests, even though the server is started in my test setup.
I also tested the route I make a call to in my unit test, in my browser, in the duration…
I am using Ubuntu 20.04 (LTS) x64, NGINX, memory 1 GB, Dart SDK version: 2.19.4 (stable) , and Dart server.
I run this dart server in the console with:
pm2 start dart --name dart_server -- run dart_server/bin/dart_server.dart
pm2 logs
The issue…
My backend API has public and authenticated methods.
I'm trying to encapsulate everything using Cascade and Pipelines, but the cascade seems to quit immediately after the first pipeline if the route isn't found.
In short, I want all requests to be…
My flutter app sends the request to this API with the GET method and uses the queryParameters like this:
Map parameters = {'id': null};
parameters.updateAll((key, value) => Uri.encodeComponent(jsonEncode(value)));
String url=…
I am using curl cli to upload a file to my shelf server, request contains header Expect: 100-continue, now curl abort by curl: (52) Empty reply from server, the correct responding seems server should 2 status codes(100 and 200):
> POST /upload…
I generated a dart project with dart create -t server-shelf . --force.
On the top folder I created a json file (my_data.json) with some mock data.
In my code I am using the data from the json file like:
final _data =…
This is the code json code from which I want to get all the keys were value is null
{
"service": "register",
"employee": {
"employeeId": "bcvfevse",
"officeId": null,
"email": null,
"name" : "Chetan Patil",
…
I want to deploy a basic dart server that uses shelf to an IIS server.
I ran the command dart compile exe and tried to place the executable along with the web.config file in a file system. I set up the workpool with the settings I need. I have a DNS…
I've been trying to change the hostname of this HTTPServer in order to access it from any machine on the network, however the site is still only accessible through localhost. I have tried parsing the "0.0.0.0" hostname string into an InternetAddress…
I am trying out some code using the shelf
package and json_serializable for handling JSON. I have 2 classes and a handler method all shown below (error handling omitted).
@freezed
abstract class User with _$User {
…
i created a async/await function in another file thus its handler is returning a Future Object. Now i can't understand how to give response to client with content of that Future Object in Dart. I am using basic dart server with shelf package.Below…