Code Monkey home page Code Monkey logo

askless-flutter-client's Introduction

I build Backend Servers and Apps for Startups and I contribute to open-source projects so other developers can do the same

๐Ÿ“น โญ Portfolio: Check videos of projects I've built โญ ๐Ÿ“น

I'm an independent freelancer, I'm not associated with any agency, WiseTap.com is my own personal domain


Testimonials (Verified by Upwork)

โ€œI had the pleasure of working with Rodrigo when we hired him at FotoFinish to build out our Android and iOS mobile applications. Rodrigo is an absolute dream to work with - he is very experienced and highly skilled in Dart/Flutter, takes initiative, is an excellent communicator. He is efficient and produces world class work. I recommend Rodrigo with no hesitation!โ€

Daniel's testimonial | Project Manager at fotofinish.com

๐ŸŽฅ Video from Daniel's best friend, Ariel Helwani, the most important MMA journalist in the world (video authorized by himself to share)

"Rodrigo is a very well rounded programmer, with great logic, organization and communication skills. Will definitely hire him again for our projects!"

Eduardo's testimonial | Co-Founder of vets.com.br

Achievements:

Technologies I'm working with:

  • ๐Ÿ”ท Node.js - Backend development

  • ๐Ÿ”ท Flutter - Android, iOS and WebApp Development

  • ๐Ÿ”ท MySQL | PostgreSQL

  • ๐Ÿ”ท Firebase

Contact:

askless-flutter-client's People

Contributors

rodrigobertotti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

askless-flutter-client's Issues

Upgrade Requested when use http server + ws server

Hello,

Thank you for your work.
I have an issue with the use of the init part.
I am working with Flutter and nodejs and I have a HTTP server on heroku that is configured.
I want to work with both HTTP Server and Ws but it keeps saying Upgrade required as soon as I request the HTTP calls.
Here is my code :

Client call to API :

Future RefreshToken(String refreshToken) async {
String url = ADDRESS_SERVER + API_VERSION + '/token';
Map<String, String> headers = {'Accept': 'application/json', 'Content-Type': 'application/json'};
String body = jsonEncode(<String, String>{
'refreshToken': refreshToken,
});

final response = await http.post(url, headers: headers, body: body);
TokenManager token;
if (response.body != "Unauthorized") {
  token = TokenManager.fromJson(json.decode(response.body));
  token.statusCode = response.statusCode;
}

if (response.statusCode == 200) {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  prefs.setString('token', token.jwt);
}
return token;

}

Server config for HTTP and WS :

const PORT = process.env.PORT || 8080;

const http = require('http');
const WebSocket = require('ws');
const askless = require("askless");

const serverDatabase = http.createServer(app);
const serverWebsocket = new askless.AsklessServer();

serverWebsocket.init({
projectName: 'XXXX',
sendInternalErrorsToClient: false,
logger: {
useDefaultLogger: true
},
wsOptions : {
port: PORT,
server: serverDatabase,
},
requestTimeoutInSeconds: 15
});

serverWebsocket.start();

serverDatabase.listen(8081);

Do you have an idea of what I do wrong please ?

Thanks

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.