Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Mi servidor Flask en Pythonanywhere.com no funciona en mi aplicación Ionic

Tengo un problema, cuando doy mi Falsk py al servicio en la nube phytonanywhere.com funciona en Hola, tengo un problema, cuando doy mi Falsk py al servicio en la nube phytonanywhere.com funciona en Chrome, pero no funciona en la aplicación.

Esta es mi matraz_app.py

 from flask import Flask, jsonify,request from posts import posts app=Flask(__name__) @app.route('/') def index(): lang = request.headers.get("Accept-Language", 'sk')[:2] p = list(map (lambda post: translate(post, lang), posts)) return jsonify(p) def translate(post, lang): translation = next (t for t in post['translations'] if t['locale'] == lang) return { "id": post ['id'], "title": translation ['title'], "description": translation ['description'], "image": post['image'], }

Trabaja en Chrome, veo esto.

ingrese la descripción de la imagen aquí

Y mi código de aplicación es

 import { Component, OnInit } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; @Component({ selector: 'app-posts2', templateUrl: './posts.component.html', styleUrls: ['./posts.component.scss'], }) export class PostsComponent implements OnInit { posts:any = []; constructor(private http: HttpClient) { } ngOnInit() { const lang = localStorage.getItem('lang') || 'sk'; const headers = new HttpHeaders({ 'Accept-Language': lang }) this.http.get('http://miki83.pythonanywhere.com/', { headers: headers }).subscribe(data=>{ console.log(); this.posts = data; }); } }

¿Cómo es el problema? Pego la URL de la nube en la aplicación.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!