Last Commit before UI change
This commit is contained in:
parent
0b0f1793ec
commit
330edb6715
3 changed files with 8 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
MONGO_URI=mongodb+srv://velar:Lokesh@1234@cluster0.mplyn1q.mongodb.net/
|
MONGO_URI=mongodb+srv://velar:Lokesh%401234@cluster0.mplyn1q.mongodb.net/
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
PORT=3000
|
PORT=3000
|
||||||
CORS_ORIGIN=http://192.168.1.100:3000
|
CORS_ORIGIN=http://192.168.1.100:3000
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,12 @@ app.use(cors({
|
||||||
const predictRoute = require('./predict');
|
const predictRoute = require('./predict');
|
||||||
app.use('/api/predict', predictRoute);
|
app.use('/api/predict', predictRoute);
|
||||||
|
|
||||||
// MongoDB connection
|
mongoose.connect('mongodb+srv://velar:Lokesh%401234@cluster0.mplyn1q.mongodb.net/finance?retryWrites=true&w=majority&ssl=true&appName=VelarApp', {
|
||||||
mongoose.connect('mongodb+srv://velar:Lokesh%401234@cluster0.mplyn1q.mongodb.net/finance', {
|
|
||||||
useNewUrlParser: true,
|
useNewUrlParser: true,
|
||||||
useUnifiedTopology: true,
|
useUnifiedTopology: true,
|
||||||
});
|
})
|
||||||
|
.then(() => console.log('MongoDB connected'))
|
||||||
|
.catch(err => console.error('MongoDB connection error:', err));
|
||||||
|
|
||||||
|
|
||||||
// Define schema and model
|
// Define schema and model
|
||||||
|
|
@ -40,7 +40,7 @@ app.post('/api/transaction/add', async (req, res) => {
|
||||||
const { description, amount } = req.body;
|
const { description, amount } = req.body;
|
||||||
|
|
||||||
// Call your AI prediction endpoint
|
// Call your AI prediction endpoint
|
||||||
const predictRes = await axios.post('http://192.168.1.100:5000/api/predict', {
|
const predictRes = await axios.post('http://10.231.31.224:5000/api/predict', {
|
||||||
description,
|
description,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -144,7 +144,7 @@ app.post('/api/transactions/voice', async (req, res) => {
|
||||||
const description = cleaned || 'misc';
|
const description = cleaned || 'misc';
|
||||||
|
|
||||||
// Step 3: Predict category using your Flask API
|
// Step 3: Predict category using your Flask API
|
||||||
const predictRes = await axios.post('http://192.168.1.100:5000/api/predict', {
|
const predictRes = await axios.post('http://10.231.31.224:5000/api/predict', {
|
||||||
description,
|
description,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
class Environment {
|
class Environment {
|
||||||
static const String baseUrl = 'velar-bja8e3ehbba3a5h9.southindia-01.azurewebsites.net';
|
static const String baseUrl = 'http://10.231.31.224:3000';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue