Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
changed all backend ports to 8080 now
Browse files Browse the repository at this point in the history
  • Loading branch information
nishkamittal committed Oct 14, 2024
1 parent d0a7faf commit ff65a60
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Chemistry Cafe API.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@Chemistry_Cafe_API_HostAddress = http://localhost:5134
@Chemistry_Cafe_API_HostAddress = http://localhost:8080

GET {{Chemistry_Cafe_API_HostAddress}}/weatherforecast/
Accept: application/json
Expand Down
4 changes: 2 additions & 2 deletions Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5134"
"applicationUrl": "http://localhost:8080"
},
"https": {
"commandName": "Project",
Expand All @@ -18,7 +18,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7226;http://localhost:5134"
"applicationUrl": "https://localhost:7226;http://localhost:8080"
},
"IIS Express": {
"commandName": "IISExpress",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Then build the project
dotnet run
```

This should start a server. You should be able to access a swagger page on the port that the server stars, for example [http://localhost:5134/swagger](http://localhost:5134)
This should start a server. You should be able to access a swagger page on the port that the server stars, for example [http://localhost:8080/swagger](http://localhost:8080)

## Installing the API locally
To build and install Chemistry Cafe locally, you must have Visual Studio 2022.
Expand Down
20 changes: 10 additions & 10 deletions frontend/src/API/API_CreateMethods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FamilyTagMechList, TagMechanismReactionList, TagMechanismSpeciesList, P
export async function createFamily(name: string) {
try {
const response = await axios.post(
'http://localhost:5134/api/Family/create',
'http://localhost:8080/api/Family/create',
"\"" + name + "\"",
{
headers: {
Expand All @@ -28,7 +28,7 @@ export async function createFamilyTagMechList(familyMechListData: FamilyTagMechL
};

const response = await axios.post(
'http://localhost:5134/api/FamilyTagMechList/create',
'http://localhost:8080/api/FamilyTagMechList/create',
requestData,
{
headers: {
Expand All @@ -46,7 +46,7 @@ export async function createFamilyTagMechList(familyMechListData: FamilyTagMechL
export async function createTagMechanism(name: string) {
try {
const response = await axios.post(
'http://localhost:5134/api/TagMechanism/create',
'http://localhost:8080/api/TagMechanism/create',
"\"" + name + "\"",
{
headers: {
Expand All @@ -64,7 +64,7 @@ export async function createTagMechanism(name: string) {
export async function createReaction(type: string) {
try {
const response = await axios.post(
'http://localhost:5134/api/Reaction/create',
'http://localhost:8080/api/Reaction/create',
"\"" + type + "\"",
{
headers: {
Expand All @@ -82,7 +82,7 @@ export async function createReaction(type: string) {
export async function createSpecies(type: string) {
try {
const response = await axios.post(
'http://localhost:5134/api/Species/create',
'http://localhost:8080/api/Species/create',
"\"" + type + "\"",
{
headers: {
Expand All @@ -106,7 +106,7 @@ export async function createTagMechanismReactionList(tagMechanismReactionListDat
version: tagMechanismReactionListData.version,
};
return axios.post(
'http://localhost:5134/api/TagMechanismReactionList/create',
'http://localhost:8080/api/TagMechanismReactionList/create',
requestData,
{
headers: {
Expand Down Expand Up @@ -134,7 +134,7 @@ export async function createTagMechanismSpeciesList(tagMechanismSpeciesListDataA
version: tagMechanismSpeciesListData.version,
};
return axios.post(
'http://localhost:5134/api/TagMechanismSpeciesList/create',
'http://localhost:8080/api/TagMechanismSpeciesList/create',
requestData,
{
headers: {
Expand All @@ -160,7 +160,7 @@ export async function createPropertyList(propertyList: PropertyList) {
};

const response = await axios.post(
'http://localhost:5134/api/PropertyList/create',
'http://localhost:8080/api/PropertyList/create',
requestData,
{
headers: {
Expand Down Expand Up @@ -192,7 +192,7 @@ export async function createPropertyVersion(propertyVersion: PropertyVersion) {
};

const response = await axios.post(
'http://localhost:5134/api/PropertyVersion/create',
'http://localhost:8080/api/PropertyVersion/create',
requestData,
{
headers: {
Expand All @@ -217,7 +217,7 @@ export async function createReactantProduct(reactantProductList: ReactantProduct
};

const response = await axios.post(
'http://localhost:5134/api/ReactantProductList/create',
'http://localhost:8080/api/ReactantProductList/create',
requestData,
{
headers: {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/API/API_DeleteMethods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import axios from 'axios';
export async function deleteFamily(uuid: string) {
try {
const response = await axios.delete(
`http://localhost:5134/api/Family/delete/${uuid}`,
`http://localhost:8080/api/Family/delete/${uuid}`,
{
headers: {
'Content-Type': 'application/json',
Expand All @@ -21,7 +21,7 @@ export async function deleteFamily(uuid: string) {
export async function deleteFamMechList(uuid: string) {
try {
const response = await axios.delete(
`http://localhost:5134/api/FamilyMechList/delete/${uuid}`,
`http://localhost:8080/api/FamilyMechList/delete/${uuid}`,
{
headers: {
'Content-Type': 'application/json',
Expand All @@ -38,7 +38,7 @@ export async function deleteFamMechList(uuid: string) {
export async function deleteTagMechanism(uuid: string) {
try {
const response = await axios.delete(
`http://localhost:5134/api/TagMechanism/delete/${uuid}`,
`http://localhost:8080/api/TagMechanism/delete/${uuid}`,
{
headers: {
'Content-Type': 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/API/API_UpdateMethods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function updatePropertyList(propertyList: PropertyList) {
};

const response = await axios.put(
'http://localhost:5134/api/PropertyList/update',
'http://localhost:8080/api/PropertyList/update',
requestData,
{
headers: {
Expand All @@ -36,7 +36,7 @@ export async function updateReactantProductList(reactantProductList: ReactantPro
};

const response = await axios.put(
'http://localhost:5134/api/ReactantProductList/update',
'http://localhost:8080/api/ReactantProductList/update',
requestData,
{
headers: {
Expand Down
16 changes: 8 additions & 8 deletions frontend/test/API_CreateMethods.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('API methods', () => {
const result = await createFamily(name);

expect(mockedCreate).toHaveBeenCalledWith(
`http://localhost:5134/api/Family/create`,
`http://localhost:8080/api/Family/create`,
`"${name}"`,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -60,7 +60,7 @@ describe('API methods', () => {
const result = await createFamilyTagMechList(familyMechListData);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/FamilyTagMechList/create',
'http://localhost:8080/api/FamilyTagMechList/create',
familyMechListData,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -77,7 +77,7 @@ describe('API methods', () => {
const result = await createTagMechanism(name);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/TagMechanism/create',
'http://localhost:8080/api/TagMechanism/create',
`"${name}"`,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -94,7 +94,7 @@ describe('API methods', () => {
const result = await createReaction(type);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/Reaction/create',
'http://localhost:8080/api/Reaction/create',
`"${type}"`,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -111,7 +111,7 @@ describe('API methods', () => {
const result = await createSpecies(type);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/Species/create',
'http://localhost:8080/api/Species/create',
`"${type}"`,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -132,7 +132,7 @@ describe('API methods', () => {
const result = await createPropertyList(propertyList);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/PropertyList/create',
'http://localhost:8080/api/PropertyList/create',
propertyList,
{
headers: { 'Content-Type': 'application/json' },
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('API methods', () => {
const result = await createPropertyVersion(propertyVersion);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/PropertyVersion/create',
'http://localhost:8080/api/PropertyVersion/create',
propertyVersion,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -185,7 +185,7 @@ describe('API methods', () => {
const result = await createReactantProduct(reactantProduct);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/ReactantProductList/create',
'http://localhost:8080/api/ReactantProductList/create',
reactantProduct,
{
headers: { 'Content-Type': 'application/json' },
Expand Down
6 changes: 3 additions & 3 deletions frontend/test/API_DeleteMethods.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('API delete functions tests', () => {

// Verify axios.delete was called with the correct URL and headers
expect(mockedDelete).toHaveBeenCalledWith(
`http://localhost:5134/api/Family/delete/${uuid}`,
`http://localhost:8080/api/Family/delete/${uuid}`,
{
headers: { 'Content-Type': 'application/json' },
}
Expand All @@ -49,7 +49,7 @@ describe('API delete functions tests', () => {

// Verify axios.delete was called with the correct URL and headers
expect(mockedDelete).toHaveBeenCalledWith(
`http://localhost:5134/api/FamilyMechList/delete/${uuid}`,
`http://localhost:8080/api/FamilyMechList/delete/${uuid}`,
{
headers: { 'Content-Type': 'application/json' },
}
Expand All @@ -68,7 +68,7 @@ describe('API delete functions tests', () => {

// Verify axios.delete was called with the correct URL and headers
expect(mockedDelete).toHaveBeenCalledWith(
`http://localhost:5134/api/TagMechanism/delete/${uuid}`,
`http://localhost:8080/api/TagMechanism/delete/${uuid}`,
{
headers: { 'Content-Type': 'application/json' },
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/test/API_UpdateMethods.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('API delete functions tests', () => {
const result = await updatePropertyList(propertyList);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/PropertyList/update',
'http://localhost:8080/api/PropertyList/update',
propertyList,
{
headers: { 'Content-Type': 'application/json' },
Expand All @@ -58,7 +58,7 @@ describe('API delete functions tests', () => {
const result = await updateReactantProductList(reactantProduct);

expect(mockedPost).toHaveBeenCalledWith(
'http://localhost:5134/api/ReactantProductList/update',
'http://localhost:8080/api/ReactantProductList/update',
reactantProduct,
{
headers: { 'Content-Type': 'application/json' },
Expand Down

0 comments on commit ff65a60

Please sign in to comment.